 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
Andy_Rayner
Joined: 08 Nov 2005 Posts: 2
|
Posted: Tue Nov 08, 2005 1:28 am Jump Menu |
|
|
|
Hello I have a Jump menu on the website I am producing and it displays a list of years and when you select a year it jumps to that page.
Here is the code:
| Code: |
<form style="margin-bottom: 0" name="form1"
<select name="menu1" onChange="MM_jumpMenu('parent',this,0)">
<option value="Year1.html" selected>1994</option>
<option value="Year2.html" selected>1995</option>
<option value="Year3.html" selected>1996</option>
<option value="Year4.html" selected>1997</option>
<option value="Year5.html" selected>1998</option>
<option value="Year6.html" selected>1999</option>
<option value="Year7.html" selected>2000</option>
<option value="Year8.html" selected>2001</option>
<option value="Year9.html" selected>2002</option>
<option value="Year10.html" selected>2003</option>
<option value="Year11.html" selected>2004</option>
<option value="Year12.html" selected>2005</option>
</select>
</form>
|
I Have two questions about this:
1. Everything seems to select ok, apart from when I try to select 2005.
2. Is it possible when you select a month that the month selected stays visible in the drop down box rather then defaulting back to 2005.
Kind Regards
Andy |
|
gary.newelluk
Joined: 12 May 2005 Posts: 548 Location: Peterhead, Scotland
|
Posted: Tue Nov 08, 2005 4:32 am |
|
|
|
Your problem lies in the fact that for each <option> tag you have added the word selected.
The word selected determines which item is the default selected item, therefore only one of your tags should contain the word selected (unless you have multiple set in the <select> tag which you don't need). |
|
Andy_Rayner
Joined: 08 Nov 2005 Posts: 2
|
Posted: Tue Nov 08, 2005 5:15 am |
|
|
|
That still doesnt cure the problem.
It doesnt show the year that has been selected when the page reloads.
For example if i choose 1997 then when the data is shown i wanted to have 1997 still in the combo box, instead of it going staright back to 2005.
Also I still cant re-select the selected one.
For Example if 2005 is selected when i open the page and i choose another year. I cannot re-choose 2005 |
|
gary.newelluk
Joined: 12 May 2005 Posts: 548 Location: Peterhead, Scotland
|
Posted: Tue Nov 08, 2005 10:10 am |
|
|
|
| Have you got a link to your page as opposed to just the source |
|
degsy

Joined: 23 Feb 2005 Posts: 2440 Location: North East, UK
|
Posted: Fri Nov 11, 2005 12:32 pm |
|
|
|
If you are reloading the page then it will default to the selected item.
This is unless you are using server-side coding and selecting the item that way. |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|
|