471,898 Members | 1,883 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,898 software developers and data experts.

Creating a list box with options that link to other pages

how do i a create a list box with option value as a link to the another page?
Oct 5 '07 #1
2 2002
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
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 YellowAndGreen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.