Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

panel problem

Status
Not open for further replies.

mchoudhury

Programmer
Nov 26, 2004
71
GB
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:DropDownList 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:DropDownList>
<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:DropDownList 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:DropDownList>
</p>

<p>
<asp:Label ID="callplan" Runat="server" Text="What is the name of the call plan you are on?"></asp:Label>
<asp:DropDownList id="state" name="TelephoneSupplierName" Runat="server"></asp:DropDownList>
</p>


<p>
<asp:Label ID="period" Runat="server" Text="How do you pay your bills?"></asp:Label>
<asp:DropDownList 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:DropDownList></p>
</div>

</asp:Table>

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top