/    Sign up×
Community /Pin to ProfileBookmark

I have a drop down menu that I can’t get to open in a new window. I have set the target to blank with no luck. Here is my code:

<form name=”TopicCompass” target=”_blank” class=””>
<div>
<div align=”center”><span class=”style31″>Retail Compass</span> <br>
<select name=”menu” onChange=”location=document.TopicCompass.menu.options[document.TopicCompass.menu.selectedIndex].value;” value=”GO”>
<option>Select a Plan</option>
<option value=”http://..Teller_Plan.pdf”>Teller</option>
<option value=”http://..FSR_Plan.pdf”>FSR</option>
<option value=”http://..PB_Plan.pdf”>Personal Banker</option>
</select>
</div>
</div></form>

Any help would be much appreciated!

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@tirnaAug 19.2010 — It appears you are misundertanding what a <form> is used for.

A form is used to collect user inputed data and then send it to a server side script for processing after the submit button was clicked by the user.

If you want to open the select menu in a new window, I would put the <div> containing the <select> in a separate html file and then use window.open() in the first html file to open the second html file containing your menu.
Copy linkTweet thisAlerts:
@yamaharussAug 19.2010 — Try window.open(document.TopicCompass.menu.options[document.TopicCompass.menu.selectedIndex].value)
×

Success!

Help @LaurieBBelle 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.4,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...