How can I add hyperlinks to a drop down menu in Frontpage 2002?

S

Smilie

In the Form Field properties box I have entered the "target Pages" under
values, but the links do not work. Why?
 
M

Mark Fitzpatrick

Unfortunately, the drop-down menu doesn't know anything about hyperlinks or
navigating. A drop down in itself is not a menu, it is simply a dropdown
list of name/value pairs. You need something else to turn it into a menu.
These are often called jump menus because they let users jump to a specified
selection.

You'll need to get a JavaScript to do this and call it through the onchange
event of your dropdown box, though you may also want to have a go button
handy for users who have a browser too old for the onchange event to work.
Here's a handy one at:
http://javascript.internet.com/navigation/jump-menu.html There are also
other scripts available at javascript.internet.com and www.dynamicdrive.com

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 
T

Trevor L.

Dan L,
I have read this thread and used it on my website.

A small question :
Should there be closing option tags i.e. </option> or is this
redundant/optional ?

Anyway, my actual question is this.

How can I
1. Reduce the width of the text boxes with the option text in them
and
2. Get a line break in these text boxes. I have tried <br> and
and
both are just ignored.

I ask because I placed this form in a sidebar menu frame (changing
window.location to top.location) and due to its width, it causes a
horizontal scrollbar to appear and the down arrow is only visible in the
frame when one scrolls sideways.

--
Cheers,
Trevor L.
Website: http://tandcl.homemail.com.au

Dan said:
This works for a drop down menu:
<form>
<select onChange="if(options[selectedIndex].value)
window.location.href=(options[selectedIndex].value)">
<option>Select a search engine...
<option value="http://www.yahoo.com">Yahoo
<option value="http://www.google.com">Google
<option value="http://www.lycos.com">Lycos
</select>
</form>

Smilie said:
In the Form Field properties box I have entered the "target Pages"
under values, but the links do not work. Why?


I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html
 
T

Thomas A. Rowe

Yes, it should have the closing tag for each line item.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WebMaster Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
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.
==============================================

Trevor L. said:
Dan L,
I have read this thread and used it on my website.

A small question :
Should there be closing option tags i.e. </option> or is this redundant/optional ?

Anyway, my actual question is this.

How can I
1. Reduce the width of the text boxes with the option text in them
and
2. Get a line break in these text boxes. I have tried <br> and
and both are just ignored.

I ask because I placed this form in a sidebar menu frame (changing window.location to
top.location) and due to its width, it causes a horizontal scrollbar to appear and the down arrow
is only visible in the frame when one scrolls sideways.

--
Cheers,
Trevor L.
Website: http://tandcl.homemail.com.au

Dan said:
This works for a drop down menu:
<form>
<select onChange="if(options[selectedIndex].value)
window.location.href=(options[selectedIndex].value)">
<option>Select a search engine...
<option value="http://www.yahoo.com">Yahoo
<option value="http://www.google.com">Google
<option value="http://www.lycos.com">Lycos
</select>
</form>

Smilie said:
In the Form Field properties box I have entered the "target Pages"
under values, but the links do not work. Why?


I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html
 
D

Dan L

I'm pretty sure there's no need for the </option>.
As for width of the drop down boxes, that's driven by the amount of text you
put into any one box - if one is wide, they'll all be that wide.
Sorry, I can't answer the <br> question. You might open a new thread and
ask "the pros" (then we'll both know :)

Trevor L. said:
Dan L,
I have read this thread and used it on my website.

A small question :
Should there be closing option tags i.e. </option> or is this
redundant/optional ?

Anyway, my actual question is this.

How can I
1. Reduce the width of the text boxes with the option text in them
and
2. Get a line break in these text boxes. I have tried <br> and and
both are just ignored.

I ask because I placed this form in a sidebar menu frame (changing
window.location to top.location) and due to its width, it causes a
horizontal scrollbar to appear and the down arrow is only visible in the
frame when one scrolls sideways.

--
Cheers,
Trevor L.
Website: http://tandcl.homemail.com.au

Dan said:
This works for a drop down menu:
<form>
<select onChange="if(options[selectedIndex].value)
window.location.href=(options[selectedIndex].value)">
<option>Select a search engine...
<option value="http://www.yahoo.com">Yahoo
<option value="http://www.google.com">Google
<option value="http://www.lycos.com">Lycos
</select>
</form>

Smilie said:
In the Form Field properties box I have entered the "target Pages"
under values, but the links do not work. Why?


I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html
 
1

116

What would be needed to have the page open to NEW?

David

Dan L said:
This works for a drop down menu:
<form>
<select onChange="if(options[selectedIndex].value)
window.location.href=(options[selectedIndex].value)">
<option>Select a search engine...
<option value="http://www.yahoo.com">Yahoo
<option value="http://www.google.com">Google
<option value="http://www.lycos.com">Lycos
</select>
</form>

Smilie said:
In the Form Field properties box I have entered the "target Pages" under
values, but the links do not work. Why?
 
H

Hot-text

http://docs.cs.up.ac.za/programming/javascript/ken/menu1.htm <<< INFO drop
down menu open new page



116 said:
What would be needed to have the page open to NEW?

David

Dan L said:
This works for a drop down menu:
<form>
<select onChange="if(options[selectedIndex].value)
window.location.href=(options[selectedIndex].value)">
<option>Select a search engine...
<option value="http://www.yahoo.com">Yahoo
<option value="http://www.google.com">Google
<option value="http://www.lycos.com">Lycos
</select>
</form>

Smilie said:
In the Form Field properties box I have entered the "target Pages"
under
values, but the links do not work. Why?
 

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