View Full Version : Please help me with drop down script

08-04-2002, 12:33 PM
Hi guys, I'm new to this forum and first off I wanted to say hi. But now I have a couple questions. I am building a website for a local business around here. I do know a little Javascript but not much. What I need is a form drop down box with three options. I would like when you select one of the options for another drop down box to appear underneath it. I would also like to know if there is a way to make a text box appear when you click a checkbox. Any help would be highly, highly appreciated and if you want I will give you credit for the script in the source on the web page.

08-04-2002, 11:23 PM
Any ideas guys?:(

08-05-2002, 12:21 AM
<form style="width:120px;">
<select name="s1"
onchange="if(this.selectedIndex==2)s2.style.display='';else s2.style.display='none'">
<option value="something">something</option>
<option value="somethingelse">somethingelse</option>
<option value="more">more</option>
<select name="s2" style="display:none;">
<input type="checkbox" onclick="t1.style.visibility=this.checked?'visible':'hidden'">
<input type="text" name="t1" style="visibility:hidden;">

08-05-2002, 05:20 AM
Thank you very very much. That was exactly what I was looking for. I was surprised to see how easy it was. But just on one more note does you know what browsers that script would be compatible with? Again thank you very very much.

-Adam:) :)