Using drop-down boxes; how?

J

John Berg

I can now insert drop-down boxes but not use them. I thought I could use an
http:// address as the value associated with a name so that selecting a name
caused a jump to the web page I coded. It doesn't. How do I use it so
that control is transfered to the value selected?
 
S

Steve Easton

Here's one that works:

<form>
<p align="center"><b>Select a Site </b>
<select id="setit" style="color: #0000FF" size="1" name="test">
<option value="">Select one</option>
<option value="http://www.altavista.com">AltaVista</option>
<option value="http://www.yahoo.com">Yahoo</option>
<option value="http://www.google.com">Google</option></select>
<input type="button" value="Go"
onclick="window.open(setit.options[setit.selectedIndex].value)">
</p></form>



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

Andrew Murray

Yes you can; in FP 2003 there is a behaviour to make a "jump menu".
(actually there's two: one with a "Go" button, and one without.

You don't mention the FP version you're using.
 
P

Paul M

Here is one that doesn't use a button if thats what you want
puy the code 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>
 
J

John Berg

I'm using FP2003

--
John Berg


Andrew Murray said:
Yes you can; in FP 2003 there is a behaviour to make a "jump menu".
(actually there's two: one with a "Go" button, and one without.

You don't mention the FP version you're using.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top