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 have encountered an same problem when html does not work in IE.
I believe it does not work if you have invalid html
Example:
For my case i am using an div without a close tag. So invalid html might be a culprit for IE
In my case, I've had to change the selector that was a <figure>
tag. This is what I had:
HTML:
<figure id="imagen">...</figure>
JS (does not work):
$("#imagen").html(res);
And I had to replace with:
HTML:
<div id="imagen">...</div>
JS (it works!):
$("#imagen").html(res);
add to .ajax options
cache: false,
The following method solved the problem for me:
$('Element ID OR Class').empty().html(string);
First use empty()
& then set html using html()
For me, I could only get it to work by placing my select in a placeholder div, and then write via .html(); the whole statement to that div. Works completely.
Try using append instead of the html method as detailed in this post.
edit
Actually, I've just run into this problem myself. For me the answer was to call empty first, then append which has the same effect (I think?) as using the html method.