How do I get drop-down menu to open links in new window?

How do I get a drop-down menu to open the links in it in a new window?

I have tried adding TARGET="_BLANK at various places on the form, but to no avail, the links still open in the current window.

I know it’s possible if I have a ‘GO’-type button that is clicked after an option is selected, but I prefer a drop-down menu that works automatically without having to press the ‘GO’ button.

<FORM NAME=“nav”><DIV>
<SELECT NAME=“SelectURL” onChange=
document.nav.SelectURL.options[document.nav.SelectURL.selectedIndex].value” TARGET=“_BLANK” >
SELECTED>Please select an option:
<OPTION VALUE=“http://CDUK.Best.CD”>
CD UK - Music Shopping
TopSites UK - Britain’s Best Websites

Can anybody help me please?


Have you tried it in the actual <FORM> tag?

Hey nazam,

Instead of using this:

<SELECT NAME="SelectURL" onChange="document.location.href=document.nav.SelectURL.options[document.nav.SelectURL.selectedIndex].value" TARGET="_BLANK" >

use this:

<select name="SelectURL" onchange="[document.nav.SelectURL.selectedIndex].value)">

aDog :cool:

Thank you :slight_smile:

You can now see the script working at - thanks to you!

You are welcome.

Just curious, but why is the Karma on that post negative?

aDog :confused:

Beats me - you rock the JavaScript world here, and I gave you Karma for your post - it was dead on, and was 100% what he was looking for.