[WEB4LIB] Dropdown JavaScript Menu

Michael Sauers msauers at bcr.org
Thu Mar 7 13:05:01 EST 2002


Got it, took your suggestion and modified the script a little...

function jump(url)
	{
	if(url=="http://nebraska.gov/")
		{
		window.location.href=url;
		}
	else
	{
	return;
	}
}

THANKS!

----------------------------------------------
Michael Sauers, Librarian, Trainer & Author
Author of The Collector's Guide to Dean Koontz
Aurora, CO :: msauers at webpan.com
http://www.webpan.com/msauers/
----------------------------------------------

> How about something like:
> 
> <select name="select" size="1" 
> onChange="jump(this.options[this.selectedIndex].value)">
> <option value="nopick" selected>Pick a state</option>
> <option value="nopick">New York</option>
> <option value="http://nebraska.gov/"">Nebraska</option>
> </select>
> 
> with the script:
> 
> <!-- Begin
> function jump(url)
> {
> if(url=="nopick")
> {
> return;
> }
> else
> {
> window.location.href=url;
> }
> return;
> }
> // End -->




More information about the Web4lib mailing list