Log in

View Full Version : Nested OPTGROUP in IE?



jlizarraga
10-31-2009, 01:01 AM
Hi all,

Does anyone know of any tricks or hacks to get nested OPTGROUP elements to work in IE?

I know this is explicitly forbidden by the HTML4 spec, and I'm using XHTML-served-as-HTML, but every other browser has no issues with it.


Thanks!

boogyman
10-31-2009, 04:31 AM
Hi all,

Does anyone know of any tricks or hacks to get nested OPTGROUP elements to work in IE?

I know this is explicitly forbidden by the HTML4 spec, and I'm using XHTML-served-as-HTML, but every other browser has no issues with it.

Thanks!

The standards are in place for a reason.
As for parsing a XHTML page as HTML, well that's just stupid, because you don't get any of the benefits provided by XHTML, but you should get errors and warnings generated because of the malformed HTML.

jscheuer1
10-31-2009, 04:36 AM
Your question lacks specifics and implies that everybody knows what OPTGROUP (as you conceive of it or as a particular approach in web design) means.

That said, IE 5+ has a documented HTML conditional comments feature that probably could be adapted to your purposes. It is a little complex, so it may take a bit of time to get it working optimally for your particular situation. But, in any case, the information on how these conditionals work is here:

http://msdn.microsoft.com/en-us/library/ms537512(VS.85).aspx

Feel free to give more specifics about your problem, and/or ask questions about these conditional comments.

One advantage to using IE conditional comments is that they are one of the things Microsoft got right - in that if used properly, they can be relied upon for what they are documented to do.