homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Gold Sponsor 2015!
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

select defaults selection

Msg#: 4262700 posted 10:41 am on Feb 4, 2011 (gmt 0)

Hi .

I am trying to find how to get a default selection so a user does not have to activtley click to get the option

<form name="form" method="POST" action="">
<select name="menu" size="5" class="news">

<option value="../archives/qsrarc/qsrarchive/2009/qsr2009.html">QSR 2009 </option>
<option value="../archives/qsrarc/qsrarchive/2008/qsr2008.html">QSR 2008 </option>
<option value="../archives/qsrarc/qsrarchive/2007/qsr2007.html">QSR 2007 </option>
<option value="../archives/qsrarc/qsrarchive/2006/qsr2006.html">QSR 2006 </option>
<option value="../archives/qsrarc/qsrarchive/2005/qsr2005.html">QSR 2005 </option>
<input type="button"
[document.form.menu.selectedIndex].value;" value="GO">

What i would like is for the top <option value="../archives/qsrarc/qsrarchive/2010/qsr2010.html">QSR 2010 </option> to become the default so that the user only has to click on the go button instead of click the selection then go , Is this possible help please



5+ Year Member

Msg#: 4262700 posted 11:26 am on Feb 4, 2011 (gmt 0)

Simply add selected="selected" to the first option.


Msg#: 4262700 posted 2:02 pm on Feb 4, 2011 (gmt 0)

Ok thanks i had completely missed that little nuget teach me to look a little harder next time Duh

Thanks pete

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved