drop downs

They have: 12 posts

Joined: Dec 1999

how can i make a link from a drop down menu open in a new window?

They have: 5,633 posts

Joined: Jan 1970

You need a code which is somehting like this:

<form name="formName">
<select name="menuName">
<option selected value="http://www.yoursite.com/page1.html">Page 1
<option value="http://www.yoursite.com/page2.html">Page 2
<option value="http://www.yoursite.com/page3.html">Page 3
</select>
<input type="button" value="Click Me" name="buttonName" onClick="window.open(document.formName.menuName.options[docudocument.formName.menuName.slectedIndex].value,'WindowName','property1,property2,property3')">
</form>

The properties for the new window are listed at:
www.pageresource.com/jscript/jwinopen.htm

Just make sure that the long bit of code from onClick=" to property3')"> is all on the same line.

I've never tried this, but it should work.

[This message has been edited by tomworld (edited 14 December 1999).]

John Pollock's picture

He has: 628 posts

Joined: Mar 1999

I'll have to put in a word for Tom as a possibe third moderator.

It looks like it will work, let us know if it does the trick.

They have: 5,633 posts

Joined: Jan 1970

Why thank you John, that sounds like a good idea. You've even made me blush

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.