Ticket #3040 (closed bug: wontfix)
Cannot use Ajax/load() etc. to load OPTGROUP in Opera
|Reported by:||kscheik||Owned by:|
|Keywords:||ajax optgroup opera||Cc:|
If you have a select tag and want to Ajax content into it, e.g. with .load(), the HTML to be inserted cannot contain <OPTGROUP> tags, because that will result in a blank/empty Ajax response. I'm not sure if this is an Opera bug, but I'm afraid so, because there's a similar bug report for Prototype.
To Reproduce (out of the top of my head):
$('#testselect').load('some optgroup and option tags');
will work if the URL returns only <option> tags, but not if it contains <opgroup> tags.
It works in Safari, Firefox 2, 3, IE6, 7, but does not it Opera 9.2 and 9.5. Tested using 1.2.5, 1.2.6 and trunk as of 2008-06-13.
(HTML) Code is 100% validatable HTML 4.01 Strict or XHTML 1.1.
Just returning <option> tags works though, so for now I detect Opera on the server and leave out the <optgroup> tags, which is too bad, because Opera renders them so nicely, they are useful, and Opera is simply the best browser ;)
I tried to track it down by using .ajax() and AFAIR the responseText is empty or the code is never reached (I don't remember right now). There's no error in the Error Console either. As I said, I guess it's Opera's fault :( though to confirm, I'd have to manually do an XmlHttpRequest to see if it's JQuery or not.
I hope JQuery can work around this somehow.
Thanks for your time and effort, keep up the good work!
- need changed from Review to Patch
- Priority changed from critical to minor
- Status changed from new to closed
- Resolution set to wontfix