Drop down menu linking
Author
Discussion

Graham.J

Original Poster:

5,420 posts

285 months

Sunday 14th March 2004
quotequote all
I've restructured the 'Changes' page on my website so the latest entry appears first.

I've also put in a drop down menu so people don't have to scroll down scanning text to find what they're looking for.

Unfortunately I don't know how to get it to skip to the relevant part when you click in the menu.

See www.grahamjyoung.co.uk/Changes.htm for what I mean.

I'm using Dreamweaver and I have the option of List (which I've entered my text into) and Value (which I don't really know what to put in).

Can anyone shed any light on the subject?

TIA

Graham

docevi1

10,430 posts

274 months

Sunday 14th March 2004
quotequote all
you need a javascript handler, and at each point in the html a <a name="xxx"></a> and link to that section using changes.htm#xxx.

checkout javascript.internet.com for suitable scripts.

Graham.J

Original Poster:

5,420 posts

285 months

Sunday 14th March 2004
quotequote all
Do I put the link (Changes.htm#whatever) in the values section of the menu editor?

I tried the above and it didn't work.

>> Edited by Graham.J on Sunday 14th March 21:46

docevi1

10,430 posts

274 months

Sunday 14th March 2004
quotequote all
using 14/4/... won't work, you need a name like 14404 (i.e. not the slashes).

Secondly it's HTML code, not editor code. Essentially you are creating a dead hyperlink which has no text and no url to send to. It acts as an anchor to which relevant sections in the page can be linked.

If you edit the HTML manually, add this to the top of the selection box :
<select name="site" onChange="top.location.href=this.options[this.selectedIndex].value" size="1">

so it should read something like

<select name="site" onChange="top.location.href=this.options[this.selectedIndex].value" size="1">
<option selected value="#">Go to....
<option value="changes.htm#14404">What happened today</option>
...
</select>

you may want to edit that post to remove the image... it isn't much use

>> Edited by docevi1 on Sunday 14th March 21:32

Graham.J

Original Poster:

5,420 posts

285 months

Sunday 14th March 2004
quotequote all
Ok, post edited.

The HTML I have for the table at the moment (I'm a complete novice btw) is as follows:

<select name="select"><br>
<option value="www.grahamjyoung.co.uk/Changes.htm#140304">14/03/04
<br>
- Oil Breathing</option><br>
<option>24/07/03 - Oil Breathing</option><br>
<option>01/07/03 - New Roll Bar</option><br>
<option>30/06/03 - Cycle wings</option><br>
<option>26/06/03 - Welding Roll Bar</option><br>
<option>25/06/03 - Roll Bar with Paul</option><br>
<option>23/05/03 - Wiring Problem</option><br>
<option>13/05/03 - Wiring Problem</option><br>
<option>05/05/03 - Steering column fitted</option><br>
<option>26/04/03 - Nothing Much</option><br>
<option value="www.grahamjyoung.co.uk/Changes.htm#25/03/03">25/03/03
<br>
- Fitted Aeroscreen</option><br>
<option>21/03/03 - Trial Fit of Aeroscreen</option><br>
<option>23/02/03 - Happy Birthday!</option><br>
<option value="www.grahamjyoung.co.uk/Changes.htm#170203">17/02/03
<br>
- New exhaust fitted</option><br>
<option>16/02/03 - Starter Motor</option><br>
<option>04/02/03 - Hole for exhaust</option><br>
<option>15/01/03 - Tim's screen arrives</option><br>
<option>10/01/03 - Stiff Button</option><br>
<option>29/12/02 - Broken Head</option><br>
<option>09/12/02 - New Exhaust</option><br>
<option>08/12/02 - Small headlamps</option><br>
<option>02/12/02 - RAC Roll Bar</option><br>
<option>28/11/02 - Buying Exhaust</option><br>
<option>27/11/02 - Buying bits</option><br>
<option>21/11/02 - New trolley jack</option><br>
<option>19/11/02 - Fit wing mirrors</option><br>
<option>10/11/02 - New Wheels</option><br>
<option>Before the site went live.</option><br>
</select>

Graham.J

Original Poster:

5,420 posts

285 months

Sunday 14th March 2004
quotequote all
....without the breaks.