HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Jump Menu
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Form
View previous topic :: View next topic  
Author Message
Andy_Rayner



Joined: 08 Nov 2005
Posts: 2

PostPosted: Tue Nov 08, 2005 1:28 am     Jump Menu Reply with quote

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

PostPosted: Tue Nov 08, 2005 4:32 am     Reply with quote

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

PostPosted: Tue Nov 08, 2005 5:15 am     Reply with quote

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

PostPosted: Tue Nov 08, 2005 10:10 am     Reply with quote

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

PostPosted: Fri Nov 11, 2005 12:32 pm     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Form All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial