Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

selected option in option tag not displayed in window

Status
Not open for further replies.

eswhite

Programmer
Jul 6, 2000
18
US
Hello All,

I have a web page that includes a list box with multiple items to choose from. I use the tag:

<option>selected=&quot;option_name&quot;>option_name</option>

to highlight a default selection (Or the user's last selection from an earlier session as read from a cookie). Users are allowed to chose multiple items. If I specify this option in the select tag:

<select name=&quot;Division&quot; multiple>

and the user chooses a single option further down in the list box, the highlighted option is not shown the next session. The listbox scrolls to the selected item when I do not specify multiple.

What am I doing wrong?

Thanks,
Eric





 
try this... :)

<option selected=&quot;option_name&quot;>option_name</option>
 
I'm sorry, it is like this: :)

<option value=&quot;option_name&quot; selected>option_name</option>
 
Thanks for the reply. I tried the different approach but still got the same result.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top