Creating hyperlinks associated to a drop down list

  • Thread starter Thread starter Alec Thorne
  • Start date Start date
A

Alec Thorne

Newcomer question, sorry..

I would like to create a drop down list within Frontpage 2000 that can
then link to different web pages - eg item1, item2 and item3 in the
drop down link to page1, page2 and page3.

Have ceated a drop down list within a form, but I cannot seem to find
where different hyperlinks can be associated with each menu item
(wasn´t sure if it could be done in a form anyway). Have also inserted
a drop down list outside of a form but again cannot find where a
specific item in the list can be associated with a hyperlink.

Am i missing something obvious here or can´t it be done this way. If
not any suggestions.

Many thanks

Alec
 
Hi Alec,

Make your dropdown the way you want. I'm assuming the first option would be
something like "Choose A Link" then flip over to HTML view and amend your
select tag thus
<select
onchange="if(this.options.selectedIndex>0)location.href=this.options[this.op
tions.selectedIndex].value">
<option value="">Choose A Link</option>
<option value="http://www.microsoft.com">Microsoft</option>
etc......

Jon
Microsoft MVP - FP
 
Jon

Have tried as you suggested with a simple drop down within a normal
table. The code is as follows.

<body>

<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="200"
height="200">
<tr>
<td>
<p align="center"><select size="1" name="Products">
<option value="">Please Select a Product</option>
<option value="http://www.page1.htm">Design
Software</option>
<option value="http://www.page2.htm">Manufacturing
Software</option>
<option value="http://www.page3.htm">Machine Tools</option>
</select></td>
</tr>
</table>
</center>
</div>

</body>

Where do I insert the line

<select onchange="if(this.options.selectedIndex>0)location.href=this.options[this.options.selectedIndex].value">

Have tried inserting this before the line

<option value="">Please Select a Product</option>

....but get an error Expected "]".

I think I should start brushing up on my HTML code..

Thanks again
Alec
 
Modify
<select size="1" name="Products">
To be
<select size="1" name="Products"
onchange="if(this.options.selectedIndex>0) location.href=this.options [this.options.selectedIndex].value">

--



| Jon
|
| Have tried as you suggested with a simple drop down within a normal
| table. The code is as follows.
|
| <body>
|
| <div align="center">
| <center>
| <table border="0" cellpadding="0" cellspacing="0" width="200"
| height="200">
| <tr>
| <td>
| <p align="center"><select size="1" name="Products">
| <option value="">Please Select a Product</option>
| <option value="http://www.page1.htm">Design
| Software</option>
| <option value="http://www.page2.htm">Manufacturing
| Software</option>
| <option value="http://www.page3.htm">Machine Tools</option>
| </select></td>
| </tr>
| </table>
| </center>
| </div>
|
| </body>
|
| Where do I insert the line
|
| <select onchange="if(this.options.selectedIndex>0)location.href=this.options[this.options.selectedIndex].value">
|
| Have tried inserting this before the line
|
| <option value="">Please Select a Product</option>
|
| ...but get an error Expected "]".
|
| I think I should start brushing up on my HTML code..
|
| Thanks again
| Alec
 
Back
Top