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

<optgroup> with disabled attribute

P: n/a
I've been having some trouble with a set of <select><optgroup><option>
dropdowns.

I've been experimenting with the disabled attribute in the <optgroup>
and <option> tags.
Seems to work in NN but not IE.

Yet this link shows Microsoft advertising that the disabled attribute
is supported by them.

http://msdn.microsoft.com/library/de...s/optgroup.asp

Does anyone know the final word on this?

Thanks,

Stewart
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
ca**************@hotmail.com (Stewart Cambridge London, UK) wrote:
I've been experimenting with the disabled attribute in the <optgroup>
and <option> tags.
Seems to work in NN but not IE.

Yet this link shows Microsoft advertising that the disabled attribute
is supported by them.


Microsoft's documentation on IE has some manifest errors.

IE does not implement the disabled attribute for <option> or <optgroup>
as defined in the HTML specification. It recognizes it though and
includes it into the DOM, so you can use it in a client-side script*).
And you could use CSS to make a disabled option look different from
selectable options.

This is inconvenient but not a serious limitation, since the attribute
itself is virtually useless without client-side scripting.

*) I guess the best way is to do that in an onchange attribute for the
<select> element. You could check whether the chosen option is a disabled
one and discard the change if it is.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.