By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,937 Members | 1,411 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,937 IT Pros & Developers. It's quick & easy.

option group

P: n/a
Does anybody know of a way to make the Routers label the default value
instead of the value at index 0? Using javascript or basic xhtml?

Here is the code.

<select name = "product">
<optgroup label = "Routers">
<option>Lan11</option>
<option>Lan12</option>
</optgroup>
</select>

Thanks ahead.

Shock

BTW, I am using this on IE6

Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Shock wrote:
Does anybody know of a way to make the Routers label the default value
instead of the value at index 0? Using javascript or basic xhtml?
Basic XHTML.
Here is the code.

<select name = "product">
<optgroup label = "Routers">
<option>Lan11</option>
<option>Lan12</option>
</optgroup>
</select>


Labels cannot be selected, but options can:

<select name="product">
...
<optgroup label = "Routers">
<option selected="selected">Lan11</option>
<option>Lan12</option>
</optgroup>
...
</select>
PointedEars

Jul 20 '05 #2

P: n/a
Thanks, that is what I thought.

Shock

"Thomas 'PointedEars' Lahn" <Po*********@web.de> wrote in message
news:3F**************@PointedEars.de...
Shock wrote:
Does anybody know of a way to make the Routers label the default value
instead of the value at index 0? Using javascript or basic xhtml?


Basic XHTML.
Here is the code.

<select name = "product">
<optgroup label = "Routers">
<option>Lan11</option>
<option>Lan12</option>
</optgroup>
</select>


Labels cannot be selected, but options can:

<select name="product">
...
<optgroup label = "Routers">
<option selected="selected">Lan11</option>
<option>Lan12</option>
</optgroup>
...
</select>
PointedEars

Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.