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
If you are parsing xml using jquery, and you need html() in IE, try this:
var content = ($.browser.msie) ? $(this).context.xml : $(this).html();
This solved my problem. I hope it will help someone too.
Greetings.
Check that any JavaScript in the returned data is syntactically correct.
I had a JSON options object that had a trailing comma, and that was enough for IE to refuse to run it.
After hours of frustration I realized that IE does not support jquery attribute functions for html5 elements other than div. I was trying to do this:
success: function (response, textStatus, XMLHttpRequest) {
$response = $(response.replace(/\t/g, " "));
$responseHTML = $response.find("#pageContainer").html();
$container.html($responseHTML);
For this element:
<nav id="pageContainer" class="content">
</nav>
By changing it to this it solved the problem:
<nav>
<div id="pageContainer" class="content">
</div>
</nav>
I had the same problem after receiving an AJAX HTML-Request with the function jQuery.ajax() and then trying to parse the result with jQuery( html_result_data ). The solution was to strip the header and all tabs and "returns" in the html_result_data like this:
success: function( data ) {
// God this is ugly
data = data.split("<body>")[1].split("</body>")[0];
data = data.split("\t").join("").split("\r").join("").split("\n").join("");
data = jQuery( data );
...
}
In my case it was so easy like change the jquery version. I was using jquery-1.3.2 and I was add this line
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"> </script>
instead jquery-1.3.2 import. Without changing anything in my source code, the .prepend function works perfectly in IE, FF and Chrome.
Also note that if you use a tagName prefix in your selector it is slower than just using the id.
In your case just use $("#edit-state").append(options)