...

View Full Version : Please help me with drop down script



GrungeSea1967
08-04-2002, 11:33 AM
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.

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

adios
08-04-2002, 11:21 PM
<html>
<head>
<title></title>
</head>
<body>
<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>
<select name="s2" style="display:none;">
<option>somethingelse</option>
<option>somethingelse</option>
<option>somethingelse</option>
</select>
<input type="checkbox" onclick="t1.style.visibility=this.checked?'visible':'hidden'">
<input type="text" name="t1" style="visibility:hidden;">
</form>
</body>
</html>

GrungeSea1967
08-05-2002, 04: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:) :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum