424,294 Members | 1,885 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,294 IT Pros & Developers. It's quick & easy.

Creating a list box with options that link to other pages

P: 1
how do i a create a list box with option value as a link to the another page?
Oct 5 '07 #1
Share this Question
Share on Google+
2 Replies


Atli
Expert 5K+
P: 5,058
Hi herele. Welcome to The Scripts!

It sounds like you want your visitors to be able to select a link from a dropdown box and be redirected there?

If so you could set the value of each option tag to the full URL of the page and use the onclick() method on the select tag itself to redirect to the value of the selected option using JavaScript.
Oct 5 '07 #2

pbmods
Expert 5K+
P: 5,821
Heya, Herele. Welcome to TSDN!

Changed thread title to better describe the problem (did you know that threads whose titles do not follow the Posting Guidelines actually get FEWER responses?).

Give each option a URL as its value. Then set the select element's onchange property to set window.location.href to the value of the selected option.
Oct 5 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.