/    Sign up×
Community /Pin to ProfileBookmark

Drop-down choices opening in a new window

I am using the below script to create a drop-down menu.

My question is: what do I need to add to the script to have each drop-down choice open in a new browser window instead of the same window?

<form name=”jump”>
<select name=”menu” onChange=”location=document.jump.menu.options[document.jump.menu.selectedIndex].value;” value=”GO”>
<option value=”#”>Select here…</option>
<option value=”http://www.aaa.com”>Choice A</option>
<option value=”http://www.bbb.com”>Choice B</option>
</select>
</form>

Thanks.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@David_HarrisonMay 18.2004 — Try this:&lt;form action="#"&gt;
&lt;select onchange="window.open(this.options[this.selectedIndex].value);return true;" value="GO"&gt;
&lt;option value="#"&gt;Select here...&lt;/option&gt;
&lt;option value="http://www.aaa.com"&gt;Choice A&lt;/option&gt;
&lt;option value="http://www.bbb.com"&gt;Choice B&lt;/option&gt;
&lt;/select&gt;
&lt;/form&gt;
×

Success!

Help @jmr5787 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.15,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...