drop down

G

Gene McKinney

I want to have a drop down but not a form just a menu
choose any suggestions?
 
S

Steve Easton

Try this, copy and paste into a blank page in html view. Then edit the options for what you want.

<p align="center"><b>Select a Site or Function: </b><select id="setit">
<option value="">Select one</option>
<option value="javascript:window.open('http://www.altavista.com')">AltaVista</option>
<option value="javascript:window.open('http://www.yahoo.com')">Yahoo</option>
<option value="javascript:window.open('http://www.google.com')">Google</option>
</select><input type="button" value="Go"
onclick="eval(setit.options[setit.selectedIndex].value)"></input>



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

Gene McKinney

-----Original Message-----
Try this, copy and paste into a blank page in html
view. Then edit the options for what you want.
<p align="center"><b>Select a Site or Function:
<option value="">Select one</option>
<option value="javascript:window.open
('http://www.altavista.com')">AltaVista said:
<option value="javascript:window.open
('http://www.yahoo.com')">Yahoo said:
<option value="javascript:window.open
('http://www.google.com')">Google said:
</select><input type="button" value="Go"
onclick="eval(setit.options
[setit.selectedIndex].value)"> said:
--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer

I want to have a drop down but not a form just a menu
choose any suggestions?


.
That sure does what I want, almost.

How do I have it so when you click the drop down and then
click yahoo it goes there. Instead of click yahoo and
then clicking go..

Thanks for what you did if I can't make it do what I want
I will go with this.
 
A

Andrew Murray

To do this without the GO button.

delete the <input type> tag at the bottom

delete the current opening select tag and replace it with

<select tag, add onchange="eval(setit.options[setit.selectedIndex].value)">

I think this is how you do it....others may post correcting me.

The onchange event is what makes it go straight to the other link.


<select tag, add onchange="eval(setit.options[setit.selectedIndex].value)">
<option....>.....</option>
</select>

etc.
Steve Easton said:
Try this, copy and paste into a blank page in html view. Then edit the options for what you want.

<p align="center"><b>Select a Site or Function: </b>
<option value="">Select one</option>
<option
value="javascript:window.open('http://www.altavista.com')">AltaVista said:
<option value="javascript:window.open('http://www.yahoo.com')">Yahoo</option>
<option value="javascript:window.open('http://www.google.com')">Google</option>
</select><input type="button" value="Go"
onclick="eval(setit.options[setit.selectedIndex].value)"></input>



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

Gene McKinney said:
I want to have a drop down but not a form just a menu
choose any suggestions?
Gene,

To do the drop down menu without the GO button.

Delete the <input type> (button) at the bottom of the code;
Add the following code to the opening <select>

onchange="eval(setit.options[setit.selectedIndex].value)"

which gives you:

<select add onchange="eval(setit.options[setit.selectedIndex].value)">

then add your <option> list (as in the demo from Steve Easton)
and close off with </select>
 
S

Steve Easton

You really need to use the Go button. If you don't, people with disabilities that can't use a mouse
and have to use tab and arrows on the keyboard will only be able to select the first thing on the
list.

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

Gene McKinney said:
-----Original Message-----
Try this, copy and paste into a blank page in html
view. Then edit the options for what you want.
<p align="center"><b>Select a Site or Function:
<option value="">Select one</option>
<option value="javascript:window.open
('http://www.altavista.com')">AltaVista said:
<option value="javascript:window.open
('http://www.yahoo.com')">Yahoo said:
<option value="javascript:window.open
('http://www.google.com')">Google said:
</select><input type="button" value="Go"
onclick="eval(setit.options
[setit.selectedIndex].value)"> said:
--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer

I want to have a drop down but not a form just a menu
choose any suggestions?


.
That sure does what I want, almost.

How do I have it so when you click the drop down and then
click yahoo it goes there. Instead of click yahoo and
then clicking go..

Thanks for what you did if I can't make it do what I want
I will go with this.
 
Top