View Full Version : drop-down menus


sammie
02-06-2003, 08:11 PM
i can put the drop down menu's on top of each other, but does anybody know how to make them go side-by-side?

Alcy
02-06-2003, 08:30 PM
Put them in the same form :), for example:

<form name="gotolocation1" method="POST">

<select name="lissamenu1" size=1>
<option value="http://www.lissaexplains.com">Lissa Explains it All</option>
<option value="http://www.lissaexplains.com/cursor.shtml">Lissa's Cursors</option>
<option value="http://www.lissaexplains.com/home">Lissa's Page</option>
</select>
<input type="button" onClick="location = document.gotolocation1.lissamenu1.options [document.gotolocation1.lissamenu1.selectedIndex].value;" value="Go">

<select name=lissamenu3 size="1" onchange="location.href=(form.lissamenu3.options[form.lissamenu3.selectedIndex].value)">
<option value="0">Choose One</option>
<option value="0"></option>
<option value="http://www.lissaexplains.com">Home</option>
</select>

</form>

sammie
02-08-2003, 06:50 PM
i also have frames, so will it work with the frames drop-down menu html too?

Alcy
02-08-2003, 08:51 PM
Yes, but because each dropdown has it's own name, you'd need one of the javascripts per dropdown :)

<script language="javascript">

function jump(form) {
var myindex=form.menu.selectedIndex
if (form.menu.options[myindex].value != "0")
{
window.open(form.menu.options[myindex].value,
target="framename");
}
}

function jump(form) {
var myindex=form.lissamenu3.selectedIndex
if (form.lissamenu3.options[myindex].value != "0")
{
window.open(form.lissamenu3.options[myindex].value,
target="framename");
}
}

</script>


<form name="lissamenu2">

<select name="menu" style="background-color: #CC99FF ;
font size=10 ; font-family: comic sans ms; color:#ffff00"
size="1" onchange="jump(this.form)">
<option value="0">Where to?</option>
<option value="0"></option>
<option value="http://www.lissaexplains.com">Home</option>
</select>

<select name="lissamenu3" style="background-color: #CC99FF ;
font size=10 ; font-family: comic sans ms; color:#ffff00"
size="1" onchange="jump(this.form)">
<option value="0">Where to?</option>
<option value="0"></option>
<option value="http://www.lissaexplains.com">Home</option>
</select>

</form>

sammie
02-09-2003, 07:17 PM
*huggles* thankies!