View Full Version : Drop downs... in three columns
jkgtnp
06-25-2001, 01:50 PM
Howdy!
The drop down shown in http://www.a1javascripts.com/form_navigation/drop/drop.html allows me to create a single drop-down menu that automatically jumps.
How could I have three drop-down menus? I have a long list that I hope to divide into three drop-downs: the first drop down for items A - I, the second drop-down for items J - R, the last drop-down for items S - Z.
Thanks,
James
jonirvine
06-25-2001, 03:52 PM
Here's an alternative, and easy, script which will do the same and let you have multiple drop downs.
Inbetween your <head> tags:
<script language="JavaScript">
<!-- Multi drop down menus
function SeekTarget(target)
{
if (target != "")
{
this.location.href = target;
}
}
// from javascript.com. -->
</script>
Then simple add the 3 drop downs and add onChange="SeekTarget(this.options[this.selectedIndex].value)" to the SELECT tag.
Eg:
<SELECT onChange="SeekTarget(this.options[this.selectedIndex].value)">
<option selected value="URL-Here">Option 1
<option value="http://www.101tutorials.com">Option 2
<option value="crosskeys/index.shtml">Option 3
</select>
<SELECT onChange="SeekTarget(this.options[this.selectedIndex].value)">
<option selected value="URL-Here">Option 4
<option value="http://www.101tutorials.com">Option 5
<option value="crosskeys/index.shtml">Option 6
</select>
<SELECT onChange="SeekTarget(this.options[this.selectedIndex].value)">
<option selected value="URL-Here">Option 7
<option value="http://www.101tutorials.com">Option 8
<option value="crosskeys/index.shtml">Option 9
</select>
This will work for any number of drop downs.
Any probs email me,
Jon
jkgtnp
06-25-2001, 04:30 PM
Worked like a charm! I appreciate your help.
Thanks, Jon!
James
jonirvine
06-26-2001, 07:45 AM
No problem mate.
Jon
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.