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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

select option help

Status
Not open for further replies.

GUJUm0deL

Programmer
Jan 16, 2001
3,676
US
Hi everyone, need some help here...
I uploaded the problem in question here: now if you make the selections from the first dropdown, and then from the second drop down, and lastly from the last drop down...and hit the submit, you'll see that only the first dropdown choice get passed...anyone know why??
Thanks...

For a better idea for the test, select these choices: 'OFFICE SUPPLIES' 'PAPER' 'COMPUTER SOFTWARE'
I have not failed; I merely found 100,000 different ways of not succeding...
 
hey there

that link doesn't work have you taken the file down ?
 
Anyone have any ideas?? I have not failed; I merely found 100,000 different ways of not succeding...
 
i did something similar for my current project, i oso have the codes u using the 2nd n 3rd will not b passed into the database as they are run by javascript
u can try this instead longer but usable
<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
</head>

<script language=&quot;JavaScript1.2&quot;>
function choose(obj){
if(obj.choice1.selectedIndex == 0){
obj.choice2.length=1
obj.choice2.options[0].value=&quot;Choose one&quot;
obj.choice2.options[0].text=&quot;Choose one&quot;
}
if(obj.choice1.selectedIndex == 1){
obj.choice2.length=2
obj.choice2.options[0].value=&quot;Now select from here&quot;
obj.choice2.options[0].text=&quot;Now select from here&quot;
obj.choice2.options[1].value=&quot;Copiers&quot;
obj.choice2.options[1].text=&quot;Copiers&quot;
}
if(obj.choice1.selectedIndex == 0 && obj.choice2.selectedIndex ==0){
obj.choice3.length=1
obj.choice3.options[0].value=&quot;Choose one&quot;
obj.choice3.options[0].text=&quot;Choose one&quot;

}
if(obj.choice1.selectedIndex == 1 && obj.choice2.selectedIndex ==1){
obj.choice3.length=2
obj.choice3.options[0].value=&quot;Now select from here&quot;
obj.choice3.options[0].text=&quot;Now select from here&quot;
obj.choice3.options[1].value=&quot;testing&quot;
obj.choice3.options[1].text=&quot;testing&quot;
}
}
</script>
<body>
<form>
<select name=&quot;choice1&quot; size=&quot;1&quot; onChange=&quot;choose(this.form)&quot;>
<option selected>Choose one</option>
<option>Office Equipment</option>
</select>
<select name=&quot;choice2&quot; size=&quot;1&quot; onChange=&quot;choose(this.form)&quot;>
<option selected>Choose one</option>
<option>Choose one</option>
</select>
<select name=&quot;choice3&quot; size=&quot;1&quot; onChange=&quot;choose(this.form)&quot;>
<option selected>Choose one</option>
<option>Choose one</option>
</select>
</form>
</body>
</html>
 
bondark, sorry I can't use your code...I tried and it doesn't seem to work for me...
In my CHOIUCE1 there are 15 options, and depending on what you select CHOICE2 and CHOICE3 can have as many as 8 options in each...kinda like this: look at all the options in and you'll see what I mean... I have not failed; I merely found 100,000 different ways of not succeding...
 
i used this for a my webpage as well and i got abt 14 choice 1 options and its working perfectly...
i cant post mine up cos company policy and its on intranet
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top