/    Sign up×
Community /Pin to ProfileBookmark

Hi there,

How would I get a drop-down form to redirect to the specified page when the relevent option is selected.

Example;

Option 1 redirects to page1.html
Option 2 redirects to page2.html
Option 3 redirects to page3.html

etc, etc.

Thanks very much/…

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@Robert_WellockMay 03.2006 — You can use either server side or JavaScript, I assume you were after the JavaScript solution.
Copy linkTweet thisAlerts:
@Little_GoatMay 03.2006 — so anyway, you would use the onchange attribute:
[CODE]<select onchange="window.location = this.value;">
<option value="http://google.com/">Google</option>
<option value="http://yahoo.com/">yahoo</option>
</select>
[/CODE]

that is what I would use.

LG
×

Success!

Help @ldoodle 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.28,
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,
)...