Element#update needs to be special cased for OPTGROUP element
Reported by Ruggero | May 2nd, 2008 @ 03:50 PM | in 1.6.1
Setting optgroup element in a select, using an Ajax call, doesn't work on Opera 9.27.
js function:
new Ajax.Updater("selSquadre",
"/actions/getSquadreBySeasonAndDt.php",
{parameters: {id: $("sp").getValue()}});
selSquadre is an existing select element and getSquadreBySeasonAndDt.php produces simple html code.
It works fine in Firefox 2.0.0.14 and IE 7.0
Best regards
Ruggero
Comments and changes to this ticket
-
John-David Dalton May 2nd, 2008 @ 05:40 PM
can you paste a snippet of the html you are trying to set?
-
Tobie Langel May 4th, 2008 @ 01:37 AM
- → State changed from new to bug
- → Title changed from Ajax.Updater & optgroup - Opera to Element#update needs to be special cased for OPTGROUP element
- → Assigned user changed from to Tobie Langel
-

Ruggero May 4th, 2008 @ 02:58 PM
- no changes were found...
-

Ruggero May 4th, 2008 @ 03:03 PM
In the html page I have this fragment of html code:
The php script is really simple:
<?
echo("");
echo("foo");
echo("");
etc...
?>
tia
-

-
John-David Dalton May 29th, 2008 @ 04:32 AM
- → Milestone changed from to 1.6.0.3
-
John-David Dalton June 3rd, 2008 @ 11:23 PM
- → Milestone changed from 1.6.0.3 to 1.6.1
Since its an ajax fix and probably related to Element#update() this fix is being pushed back to 1.6.1
-
John-David Dalton June 3rd, 2008 @ 11:32 PM
this test confirms its an issue in Opera 9.25+ (including 9.5)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/stric..."> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <head> <title>Test selectboxes and optgroups in Opera (9.25 & 9.5)</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <script src="prototype.js" type="text/javascript"></script> <script type="text/javascript"> document.observe('dom:loaded', function() { $('select-test').update('<optgroup label="ABC"><option value="a">AA</option><option value="b">BB</option><option value="c">CC</option></optgroup>'); }); </script> </head> <body> <select id="select-test"> <option value="1">one</option> <option value="2">two</option> <option value="3">three</option> </select> </body> </html> -
Yoan Blanc June 18th, 2008 @ 04:13 PM
This bug Opera related, see: http://dev.jquery.com/ticket/3040
The workaround is to avoid using innerHTML, even MSIE likes it.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
The Prototype JavaScript library.
