M
mark s.
I want to link to another page based on the user
selecting a value in the drop-down box. Simple right?
Mark
selecting a value in the drop-down box. Simple right?
Mark
RC- said:Steve,
Your code sample will work for what I'm trying to do too! I have one
question though, I want to fire the event on the onChange trigger. It works
if I actually change from one value to another, but I want to be able to
fire it just by clicking on the value. The onClick trigger fires before I
have made my selection. Is there way I can do this?
TIA
RC-
Steve Easton said:Also this one will work and doesn't need the external script tags containing the function:
<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
<optionvalue="javascript:window.open('http://www.google.com')">Google said:</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
mark s. said:I want to link to another page based on the user
selecting a value in the drop-down box. Simple right?
Mark
RC- said:The onchage trigger still does not do what I need it to. For example, I
click the drop down and choose Alta Vista. I am then directed to the Alta
Vista site. I go back and click the drop down and choose Alta Vista again
and nothing happens, because the onchage event was not triggered because
nothing changed.
Steve Easton said:Yes. However, the drawback is that people with disabilities which prevent them from using a mouse
will never be able to select anything other than the first item in the list.
That's why I didn't post it that way. However, here it is.
<p align="center"><b>Select a Site: </b><select id="setit"
onchange="eval(setit.options[setit.selectedIndex].value)">
<option value="">Select one</option>
<option value="javascript:window.open('http://www.altavista.com')">AltaVista</option
<optionvalue="javascript:window.open('http://www.yahoo.com')">Yahoo said:<optionvalue="javascript:window.open('http://www.google.com')">Google said:</select>
--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
.......................with a computer
Steve,
Your code sample will work for what I'm trying to do too! I have one
question though, I want to fire the event on the onChange trigger. It works
if I actually change from one value to another, but I want to be able to
fire it just by clicking on the value. The onClick trigger fires before I
have made my selection. Is there way I can do this?
TIA
RC-
Also this one will work and doesn't need the external script tags
containing the function:
<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.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
I want to link to another page based on the user
selecting a value in the drop-down box. Simple right?
Mark
RC- said:You open Google, run your search and then close the google page w/o giving
it a second though. Now, you want to lauch Google again but you can't
launch it by clicking on the Google option in the drop down so you have to
click somthing else just to get it to run again. Probably won't happen
often, but I'm sure it will ;-).
But, I decided to just go with the original design of having a go button,
it's better in the long run!
Thanks for your input!
different entry and it will openSteve Easton said:Correct. That's how it is supposed to work. Go back and select aa different page.
I don't understand why you need to go back, and then reselect the same page to open again.!! ??
--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
.......................with a computer
The onchage trigger still does not do what I need it to. For example, I
click the drop down and choose Alta Vista. I am then directed to the Alta
Vista site. I go back and click the drop down and choose Alta Vista again
and nothing happens, because the onchage event was not triggered because
nothing changed.
Yes. However, the drawback is that people with disabilities which prevent
them from using a mouse
will never be able to select anything other than the first item in the
list.
That's why I didn't post it that way. However, here it is.
<p align="center"><b>Select a Site: </b><select id="setit"
onchange="eval(setit.options[setit.selectedIndex].value)">
<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>
--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
.......................with a computer
Steve,
Your code sample will work for what I'm trying to do too! I have
one
question though, I want to fire the event on the onChange trigger. It
works
if I actually change from one value to another, but I want to be able to
fire it just by clicking on the value. The onClick trigger fires before
I
have made my selection. Is there way I can do this?
TIA
RC-
Also this one will work and doesn't need the external script tags
containing the function:
<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
<optionvalue="javascript:window.open('http://www.google.com')">Google said:</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
I want to link to another page based on the user
selecting a value in the drop-down box. Simple right?
Mark