/    Sign up×
Community /Pin to ProfileBookmark

Combined Pulldown Menu Help!

I got a combined menu script from here…

[url]http://javascript.internet.com/navigation/combined-menu.html[/url]

How do I make the script open in a new window? The script provided only opens in the same window.

Here’s the code…

<SCRIPT LANGUAGE=”JavaScript”>
<!– Original: Ronnie T. Moore, Editor –>
<!– Idea by: Selvi Narayanan –>

<!– This script and many more are available free online at –>
<!– The JavaScript Source!! [url]http://javascript.internet.com[/url] –>

<!– Begin
site = “http://www.yoursite.com“; // Do not include the final “/”
function combineMenus(frm, menu1, menu2) {
with (frm) {
str = menu1.options[menu1.selectedIndex].value;
str += menu2.options[menu2.selectedIndex].value;
url = site + “/” + str + “.html”;
window.location.href = url;
}
}
// End –>
</script>
</HEAD>

<BODY>

<center>
<form name=menufrm>
<select name=menu1>
<option value=””>Make</option>
<option value=”Ford”>Ford</option>
<option value=”Chevy”>Chevy</option>
<option value=”Toyota”>Toyota</option>
</select>

<select name=menu2>
<option value=””>Year</option>
<option value=”1998″>1998</option>
<option value=”1999″>1999</option>
<option value=”2000″>2000</option>
</select>

<input type=button value=”Select” onClick=”combineMenus(this.form, this.form.menu1, this.form.menu2)”>
</form>

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @d3k 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.19,
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,
)...