function Validations()
{
if(document.getElementById("chkHomePhone").checked==true && document.getElementById("drpPhoneList").value=="Select Phone Line")
{
alert("PLEASE SELECT PONE LINE..");
return false;
}
<cc1:Accordion ID="Accordion2" runat="server" SelectedIndex="0"
TransitionDuration="300" FadeTransitions="true"
style="position:absolute; top: 1417px; left: 307px; height: 136px;">
<Panes>
<cc1:AccordionPane runat="server">
<Header>SINGLE PRODUCT</Header>
<Content>
<table bgcolor="#E4D7D1">
<tr>
<td class="heading" colspan="4">
Single Product
</td>
</tr>
<tr>
<td class="text">
<asp:RadioButton ID="chkHomePhone" runat="server" Text="Home Phone"
GroupName="Category" />
</td>
<td class="text">
<asp:RadioButton ID="chkInterNet" runat="server" Text="Inter Net"
GroupName="Category" />
</td>
<td class="text">
<asp:RadioButton ID="chkTv" runat="server" Text="Television"
GroupName="Category" />
</td>
</tr>
</table>
</Content>
</cc1:AccordionPane>
<cc1:AccordionPane ID="AccordionPane3" runat="server">
<Header>BUNDLE</Header>
<Content>
<table>
<tr>
<td class="heading" colspan="4">
Bundle
</td>
</tr>
<tr>
<td style="white-space:nowrap" class="text">
<asp:RadioButton ID="rdoHomePhoneNet" runat="server" GroupName="Bundle" Text="Home Phone & InterNet" />
</td>
<td style="white-space:nowrap" class="text">
<asp:RadioButton ID="rdoHomePhoneRdoTv" runat="server" GroupName="Bundle" Text="Home Phone & TV" />
</td>
<td style="white-space:nowrap" class="text">
<asp:RadioButton ID="rdoNetTv" runat="server" GroupName="Bundle" Text="InterNet & TV" />
</td>
<td style="white-space:nowrap" class="text">
<asp:RadioButton ID="rdoTvHomeNet" runat="server" GroupName="Bundle" Text="Home Phone & InterNet & TV " />
</td>
</tr>
</table>
</Content>
</cc1:AccordionPane>
</Panes>
</cc1:Accordion>
<asp:Button ID="btnAdd" runat="server" Text="ADD" OnClientClick="return Validations()"
OnClick="btnAdd_Click" class="button"/>
when this checkbox is placd out of accordian then it works fine but when it is placed withing accordiance pane there is error says object is required
jamshed ahmed 0 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.