How do I create a drop down list with hyperlinks?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to create a drop down box listing other web sites. Tried some
stuff found on the web but nothing worked so far.
Thanks
 
You really should use onClick with a Go button to fire the Onclick.
People who don't / can't use a mouse will only be able to open Google.

Try it using the Tab and Arrow keys and you'll see what I mean.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer

Dan L said:
This works for me:

<form>
<select onChange="if(options[selectedIndex].value)
window.location.href=(options[selectedIndex].value)">
<option>Select a site...
<option value="http://www.google.com">Google</option>
<option value="http://www.lycos.com">Lycos</option>
<option value="http://www.yahoo.lcom">Yahoo</option>
</select>
</form>

Kathleen said:
I would like to create a drop down box listing other web sites. Tried some
stuff found on the web but nothing worked so far.
Thanks
 
Hi

Try this
Put it in the body tag

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>

<form name="form1" id="form1" method="post" action="">
<div align="right">
<select name="menu1" onchange="MM_jumpMenu('parent',this,0)"
size="1">
<option>select your choice...</option>
<option value="http://www.google.co.uk/">google</option>
<option value="http://www.yahoo.com/">yahoo</option>
</select>
</div>
</form>
 
Kathleen said:
I would like to create a drop down box listing other web sites. Tried some
stuff found on the web but nothing worked so far.
Thanks

Very simple, but effective drop-down list.

<select size="1" onchange="window.location.href = options.value">
<option>Websites:</option>
<option value="http://www.google.ca">Google</option>
<option value="http://www.yahoo.com">Yahoo</option>
<option value="http://www.mamma.com">Mamma</option>
</select>
 
Select the form on the page in FP, then under Form Properties you can set the target value. FYI: If
may appear grayed out, but you can still use the option.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

RG at UW said:
Dan, can you help me decide where to add the target="_blank" so the link
opens in a new window?
Thanks

Dan L said:
This works for me:

<form>
<select onChange="if(options[selectedIndex].value)
window.location.href=(options[selectedIndex].value)">
<option>Select a site...
<option value="http://www.google.com">Google</option>
<option value="http://www.lycos.com">Lycos</option>
<option value="http://www.yahoo.lcom">Yahoo</option>
</select>
</form>

Kathleen said:
I would like to create a drop down box listing other web sites. Tried some
stuff found on the web but nothing worked so far.
Thanks
 
Back
Top