I have some code like this:
var mySelect = document.getElementById("mySelect");
mySelect.innerHTML = "<option>Loading...</option>";
$.get("ajaxPage.php", {"args":args}, function(r) {
mySelect.innerHTML = r;
});
The ajax response is something like this:
<option value="1">Option 1</option>
<option value="2">Option 2</option>
And it works gracefully in Chrome, Aurora / Firefox, Opera and Safari (I’ve tested each one), but IE9 refuses to accept the response.
After looking at IE9’s ‘Inspect Element’ window (I don’t know exactly its name) I could see IE9 tries to render the response as a simple text node, such as:
Option 1Option 2
And why that happens is what is bugging me.
I’m sorry if that was already questioned here, I did a little searching and could see no answers that could help me.
TIA, André
This has been an IE bug for as long as I can remember:
http://support.microsoft.com/kb/276228
I think that the JQuery equivalent has the bug fixed: