✄codebook

a cut&paste code archive

Dropdown Select Menu for URL Links

13/01/09 01:06 PM

Credits

  1. the original creator of this script is unknown, however, if it happens to be you, please contact me and i’ll credit you rightaway.

Scenario

Create a dropdown menu that, when an option is selected, will launch a new window that opens up the specified link.

Solution

step1

Insert this code into <head> and </head> of your html document:

step2

and this is the code that you put in your <body>.

change the URLs and linking names to your own. add more lines if needed.
text within <option selected> and </option> is the line that will be displayed/first selected when the page is loaded.

view the demo here.

that’s it! tadah!

Tags: JavaScript


Comment