469,575 Members | 1,680 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,575 developers. It's quick & easy.

Creating a list box with options that link to other pages

1
how do i a create a list box with option value as a link to the another page?
Oct 5 '07 #1
2 1946
Atli
5,058 Expert 4TB
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
5,821 Expert 4TB
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.

Similar topics

3 posts views Thread by Guadala Harry | last post: by
2 posts views Thread by Buddy Ackerman | last post: by
6 posts views Thread by Jeff | last post: by
7 posts views Thread by Brian | last post: by
5 posts views Thread by outstretchedarm | last post: by
5 posts views Thread by tech.rawsteak | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.