PDA

View Full Version : Need Javascript Drop Down Menu Help


mfrail
11-03-2003, 12:09 AM
I have a drop down menu


<select name="BCSL_South">
<option value ="" SELECTED>BCSL South</option>
<option value="under.html">Team</option>
<option value="under.html">Team</option>
<option value="under.html">Team</option>
<option value="under.html">Team</option>
<option value="under.html">Team</option>
<option value="under.html">Team</option>
<option value="under.html">Team</option>
<option value="under.html">Team</option>
</select>

I want to make this drop down menu into a javascript to open the desired page into a resized new window. I also dont want the first one (SELECTED) to open to anything.

If anyone can give me any help that would be great. I have no idea how to do this and i have looked at many scripts with no luck. I also would like to attempt to get it to wokr in both Netscape and IE.

Please HELP!!!

God Zilla
11-03-2003, 03:15 AM
I´m not sure I understand exactly what you mean, (Sorry, I´m from Sweden :) ),
but maybe this is what you want?

<html>

<head>

<script language="JavaScript" type="text/javascript">
<!--
function popup(page){
window.open(page,"popup","scrollbars=1,resizable=1,width=450,height=220"); }
//-->
</script>

<title>My page</title>
</head>

<body>

<SELECT NAME="menu" onchange="location.href = this.options[this.selectedIndex].value">
<option>BCSL South</option>
<option value="javascript:popup('under.html');">Team</option>
<option value="javascript:popup('under.html');">Team</option>
<option value="javascript:popup('under.html');">Team</option>
<option value="javascript:popup('under.html');">Team</option>
<option value="javascript:popup('under.html');">Team</option>
<option value="javascript:popup('under.html');">Team</option>
<option value="javascript:popup('under.html');">Team</option>
<option value="javascript:popup('under.html');">Team</option>
</SELECT>

</body>
</html>


Hope I helped.. ;)

piglet
11-03-2003, 07:36 AM
Hi,

Ah - three threads for the same question!

This should cover both the NS-making work, and also filter out any attempt to do anything should option zero (the first option) be chosen:

<select name="BCSL_North" onchange ="if (this.selectedIndex) showpage(this.options[this.selectedIndex].value);">