mchoudhury
Programmer
Hi guys,
I have this pannel where the function is written in JS. I fteh user slects no then teh panel shows up. I'm trying to put the whole thing insid ethe table. Everytime i insert <TR> or <TD> the panels shows up within the table - i dont want the panel to show up unless the users selects no from the drop down list. Can someone see whats wrong with this:
<table cellpadding="0" cellspacing="0" border="0" width="90%" style="border: 1px solid #6666CC;" align="center">
<DIV><asp:Label ID="additional" Runat="server" Text="Do you use the above supplier for all your telephone calls?"></asp:Label>
<asp
ropDownList id="additionalsupplier" onChange="document.getElementById('pnadditionalsupplier').style.display=(this.selectedIndex == 2)?'inline':'none';" Runat="server">
<asp:ListItem value="0">Please Select</asp:ListItem>
<asp:ListItem value="1">Yes</asp:ListItem>
<asp:ListItem value="2">No</asp:ListItem>
</asp
ropDownList>
<asp:requiredfieldvalidator id="addtionalsuppllier2" runat="server" text="*" controltovalidate="additionalsupplier" errormessage="Please Select Yes or No" initialvalue="0"></asp:requiredfieldvalidator></div>
<div id="pnadditionalsupplier" style="display: none;">
<p>
<asp:Label ID="second" Runat="server" Text="Choose the second supplier you make calls through"></asp:Label></td>
<asp
ropDownList id="secondsupplier" onChange="populatePlan(this);" Runat="server">
<asp:ListItem value="0">Please Select..</asp:ListItem>
<asp:ListItem value="1">BT</asp:ListItem>
<asp:ListItem value="2">NTL</asp:ListItem>
<asp:ListItem Value="3">Telewest</asp:ListItem>
</asp
ropDownList>
</p>
<p>
<asp:Label ID="callplan" Runat="server" Text="What is the name of the call plan you are on?"></asp:Label>
<asp
ropDownList id="state" name="TelephoneSupplierName" Runat="server"></asp
ropDownList>
</p>
<p>
<asp:Label ID="period" Runat="server" Text="How do you pay your bills?"></asp:Label>
<asp
ropDownList id="paymentmethod2" AutoPostBack="False" Runat="server">
<asp:listitem Text="Please Select...." Value="0" />
<asp:listitem Text="Direct Debit" Value="1"/>
<asp:listitem Text="Cash or Cheque" Value="2" />
</asp
ropDownList></p>
</div>
</asp:Table>
thanks
I have this pannel where the function is written in JS. I fteh user slects no then teh panel shows up. I'm trying to put the whole thing insid ethe table. Everytime i insert <TR> or <TD> the panels shows up within the table - i dont want the panel to show up unless the users selects no from the drop down list. Can someone see whats wrong with this:
<table cellpadding="0" cellspacing="0" border="0" width="90%" style="border: 1px solid #6666CC;" align="center">
<DIV><asp:Label ID="additional" Runat="server" Text="Do you use the above supplier for all your telephone calls?"></asp:Label>
<asp
<asp:ListItem value="0">Please Select</asp:ListItem>
<asp:ListItem value="1">Yes</asp:ListItem>
<asp:ListItem value="2">No</asp:ListItem>
</asp
<asp:requiredfieldvalidator id="addtionalsuppllier2" runat="server" text="*" controltovalidate="additionalsupplier" errormessage="Please Select Yes or No" initialvalue="0"></asp:requiredfieldvalidator></div>
<div id="pnadditionalsupplier" style="display: none;">
<p>
<asp:Label ID="second" Runat="server" Text="Choose the second supplier you make calls through"></asp:Label></td>
<asp
<asp:ListItem value="0">Please Select..</asp:ListItem>
<asp:ListItem value="1">BT</asp:ListItem>
<asp:ListItem value="2">NTL</asp:ListItem>
<asp:ListItem Value="3">Telewest</asp:ListItem>
</asp
</p>
<p>
<asp:Label ID="callplan" Runat="server" Text="What is the name of the call plan you are on?"></asp:Label>
<asp
</p>
<p>
<asp:Label ID="period" Runat="server" Text="How do you pay your bills?"></asp:Label>
<asp
<asp:listitem Text="Please Select...." Value="0" />
<asp:listitem Text="Direct Debit" Value="1"/>
<asp:listitem Text="Cash or Cheque" Value="2" />
</asp
</div>
</asp:Table>
thanks