View Full Version : figuring out links with forms

04-28-2003, 07:04 AM
I'm trying to set up a group of similar links into "form" style
with a pull down menu using the OPTION method

the thing is though I want the new web page to open in a NEW window not the "_top"

can someone give me any source code that might help ??


04-28-2003, 08:28 AM
You can create a sort of 'group' inside of an <select> form element using <optgroup>, this element is placed outside of your <option>.

Here, this is a dropdown with 2 groups that opens in a new window (hoping it works), is this sort of what you are looking for? :D

<select onChange="popup=window.open('','popup');popup.location=options[selectedIndex].value;">
<optgroup label="boys">
<option value="http://">Tim</option>
<option value="http://">John</option>
<option value="http://">Rick</option>
<optgroup label="girls">
<option value="http://">Jane</option>
<option value="http://">Susan</option>
<option value="http://">Mary</option>

The action is triggered by the OnChange="" javascript event handler.

04-28-2003, 08:56 AM
Perfect, that is exactly what I was looking for

Many Thanks