frontpage drop-down menus

G

Guest

Please help! I know how to create a drop-down menu in Front page 2002. What I
can't figure out is how to link each item in the list to the web page it is
suppose to go to when selected.
 
G

Guest

Darianno:

Try this:

<SCRIPT LANGUAGE="JavaScript"><!--
function goto_URL(object) {
window.location.href = object.options[object.selectedIndex].value;
}
//--></SCRIPT>

<FORM>
<SELECT NAME="selectName" onChange="goto_URL(this.form.selectName)">
<OPTION VALUE="apage.htm">A page
<OPTION VALUE="bpage.htm">Another page
</SELECT>
</FORM>

Hope this helps.

John Cello
www.johncelloconsulting.com
 
S

Steve Easton

Actually it's better to fire the script with a Go button and an onclick event, because people who
navigate with the keyboard will never get past the first selection in the dropdown.

Also, the entire thing can be self contained.
<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>

Additionally, window.open(setit.options[setit.selectedIndex].value
makes it NN compatible.



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

John Cello said:
Darianno:

Try this:

<SCRIPT LANGUAGE="JavaScript"><!--
function goto_URL(object) {
window.location.href = object.options[object.selectedIndex].value;
}
//--></SCRIPT>

<FORM>
<SELECT NAME="selectName" onChange="goto_URL(this.form.selectName)">
<OPTION VALUE="apage.htm">A page
<OPTION VALUE="bpage.htm">Another page
</SELECT>
</FORM>

Hope this helps.

John Cello
www.johncelloconsulting.com

dariannao said:
Please help! I know how to create a drop-down menu in Front page 2002. What I
can't figure out is how to link each item in the list to the web page it is
suppose to go to when selected.
 
G

Guest

Which is why you're an MVP and I have the disclaimer in my profile.

Thanks Steve. I personally have learned a lot from your posts.

Steve Easton said:
Actually it's better to fire the script with a Go button and an onclick event, because people who
navigate with the keyboard will never get past the first selection in the dropdown.

Also, the entire thing can be self contained.
<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>

Additionally, window.open(setit.options[setit.selectedIndex].value
makes it NN compatible.



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

John Cello said:
Darianno:

Try this:

<SCRIPT LANGUAGE="JavaScript"><!--
function goto_URL(object) {
window.location.href = object.options[object.selectedIndex].value;
}
//--></SCRIPT>

<FORM>
<SELECT NAME="selectName" onChange="goto_URL(this.form.selectName)">
<OPTION VALUE="apage.htm">A page
<OPTION VALUE="bpage.htm">Another page
</SELECT>
</FORM>

Hope this helps.

John Cello
www.johncelloconsulting.com

dariannao said:
Please help! I know how to create a drop-down menu in Front page 2002. What I
can't figure out is how to link each item in the list to the web page it is
suppose to go to when selected.
 
S

Steve Easton

Thanks

Well, I have to tell the truth. I used to do my dropdowns using onchange until FrontPage MVP
Kathleen Anderson aka "The Accessibility Diva" gave me the dickens about it.

;-)

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

John Cello said:
Which is why you're an MVP and I have the disclaimer in my profile.

Thanks Steve. I personally have learned a lot from your posts.

Steve Easton said:
Actually it's better to fire the script with a Go button and an onclick event, because people who
navigate with the keyboard will never get past the first selection in the dropdown.

Also, the entire thing can be self contained.
<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>

Additionally, window.open(setit.options[setit.selectedIndex].value
makes it NN compatible.



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

John Cello said:
Darianno:

Try this:

<SCRIPT LANGUAGE="JavaScript"><!--
function goto_URL(object) {
window.location.href = object.options[object.selectedIndex].value;
}
//--></SCRIPT>

<FORM>
<SELECT NAME="selectName" onChange="goto_URL(this.form.selectName)">
<OPTION VALUE="apage.htm">A page
<OPTION VALUE="bpage.htm">Another page
</SELECT>
</FORM>

Hope this helps.

John Cello
www.johncelloconsulting.com

:

Please help! I know how to create a drop-down menu in Front page 2002. What I
can't figure out is how to link each item in the list to the web page it is
suppose to go to when selected.
 
J

Jon Spivey

But addressing a form object by ID rather than name will fail in old
browsers (NN4 etc) if we're going for accessible we might as well go all the
way :)
<select name="test">
and then
<input type="button" value="Go"
onclick="window.open(this.form.test.options[this.form.test.options.selectedIndex].value);">

--
Cheers,
Jon
Microsoft MVP

Steve Easton said:
Thanks

Well, I have to tell the truth. I used to do my dropdowns using onchange
until FrontPage MVP
Kathleen Anderson aka "The Accessibility Diva" gave me the dickens about
it.

;-)

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

John Cello said:
Which is why you're an MVP and I have the disclaimer in my profile.

Thanks Steve. I personally have learned a lot from your posts.

Steve Easton said:
Actually it's better to fire the script with a Go button and an onclick
event, because people who
navigate with the keyboard will never get past the first selection in
the dropdown.

Also, the entire thing can be self contained.
<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>

Additionally, window.open(setit.options[setit.selectedIndex].value
makes it NN compatible.



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

message
Darianno:

Try this:

<SCRIPT LANGUAGE="JavaScript"><!--
function goto_URL(object) {
window.location.href =
object.options[object.selectedIndex].value;
}
//--></SCRIPT>

<FORM>
<SELECT NAME="selectName" onChange="goto_URL(this.form.selectName)">
<OPTION VALUE="apage.htm">A page
<OPTION VALUE="bpage.htm">Another page
</SELECT>
</FORM>

Hope this helps.

John Cello
www.johncelloconsulting.com

:

Please help! I know how to create a drop-down menu in Front page
2002. What I
can't figure out is how to link each item in the list to the web
page it is
suppose to go to when selected.
 

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

Similar Threads


Top