I am using country and state dropdowns in my form. Whenever the user selects the country in the dropdown, the respective states of the country will populate in the states dr
I had a issue on IE using this:
$('#valor_total').html(valor_total);
where id
had the same name as the variable passed as a parameter. Changing the id worked well:
$('#div_valor_total').html(valor_total);
Are you using 1.4.2? There's an issue with the cleanData
method using invalid cache entries in IE. The bug and corresponding fix can be found here. This affects calls to .html()
Adding the no cache attribute to the controller fixed this for me.
Copied from this answer: https://stackoverflow.com/a/12948321/1389589
I had the same problem and found that the simplest solution was to use the replaceWith()
function.
I just ran into the same issue and none of the suggested fixes helped. Turns out tab characters in the passed string were the cause. As soon as I removed all of them, both html() and append() worked just fine. Guess no formatted strings for IE.. hmpf.
As the solution is not mentioned here: I just had the same problem in IE8 when activating compatibility mode. The solution was to pass in a jQuery object to the .html() function like this:
$("select#edit-state").html($(options));
This was not a problem if the options were a jQuery object and also built as one. But in the above example, this should do the trick - at least for me it did.