Listbox Link To URL

J

Jay

Looking how to have a selected list box entry evaluated
(Have list of states in list box)
and based on the value (Ex : Hawaii ) bring
up a URL.

Example
If Listbox entry Hawaii then
URL = www.hawaii.com
ElseIf
Listbox entry Connecticut then
URL = www.connecticut.com
Else
URL = www.yahoo.com
End If

Looking for example with not much luck as of yet..

TIA
 
M

MD Websunlimited

Hi Jay,

Take a look at J-Bots Drop Down Jump component. Using the Size parameter you can create a list box, then when a list item is
selected you can transfer to a URL either automatically, use a button, image, or a text hyperlink.

See : http://www.websunlimited.com/order/Product/navigation/jump.htm
--
Mike -- FrontPage MVP '97-'02
http://www.websunlimited.com
Need to protect your web pages Page Protector Pro
http://www.websunlimited.com/order/Product/PagePro/pagepro.htm
FrontPage Add-ins Since '97 2003 / 2002 / 2000 Compatible
 
S

Steve Easton

Copy and paste this into a new blank page in html view and then test it in preview.

It may give you some ideas.
The user has to click a Go button, which you should have for people who can't use a mouse.

<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="launchit()"></input>

<script language="javascript">
function launchit(){
eval(setit.options[setit.selectedIndex].value);
}
</script>




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

Steve Easton

It will also work without needing to call a function if done like this:


<p align="center"><b>Select a Site: </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

Steve Easton said:
Copy and paste this into a new blank page in html view and then test it in preview.

It may give you some ideas.
The user has to click a Go button, which you should have for people who can't use a mouse.

<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="launchit()"></input>

<script language="javascript">
function launchit(){
eval(setit.options[setit.selectedIndex].value);
}
</script>




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

Jay said:
Looking how to have a selected list box entry evaluated
(Have list of states in list box)
and based on the value (Ex : Hawaii ) bring
up a URL.

Example
If Listbox entry Hawaii then
URL = www.hawaii.com
ElseIf
Listbox entry Connecticut then
URL = www.connecticut.com
Else
URL = www.yahoo.com
End If

Looking for example with not much luck as of yet..

TIA
 
J

John Jansen \(MSFT\)

In FrontPage 2003, you can do this by clicking Format > Behaviors and
choosing "Jump Menu".
 
G

Guest

Is that in 2000 also, I am not at home now.

-----Original Message-----
In FrontPage 2003, you can do this by clicking Format > Behaviors and
choosing "Jump Menu".

--
Thanks!
John Jansen
Microsoft Office FrontPage
This posting is provided "AS IS" with no warranties, and confers no rights.



.
 

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