I'm hitting my head on the wall against this one ...
I have the following code:
$("#home").click(function(e) {
$(".tabs").attr("src","tabs-home.gif");
$(".islice").hide('fast');
$(".islice").load("home.html");
$(".islice").show('fast');
e.preventDefault();
});
It works perfectly fine in Firefox, Safari and Chrome, but IE only runs attr() and does not do either the hide/show or the load. I tried removing the hide and show and it still does not work.
IE reports no syntax errors, even with DebugBar. What could I be doing wrong?
You can see the live site at http://www.brick-n-mortar.com
I had the same problem with IE9.
All ajax requests die silently by default. By using http://api.jquery.com/ajaxError/ I was able to determine the type of error by logging the exception message: An error with the code c00ce56e.
It turns out that this means the response is not being passed utf-8 encoded, as it should be in response to an ajax request.
Turns out I had an typing error in
header('Content-type: text/html; charset=utf-8');
I am having the same problem. Many sites I have found have suggested that IE may be caching your code and suggest to append the code to
This should ensure that a IE isn't caching.
See http://zacster.blogspot.com/2008/10/jquery-ie7-load-url-problem.html for more info.
I was having a similar issue and was able to make it work this way:
.load()
and.html()
don't work very well in IE; especially if you don't have valid HTML.I found this workaround to be working:
where:
If load is with PHP, reset your array values. For example:
The
e.preventDefault()
won't make any difference in IE - you'll have to usereturn false;
to stop things from happening:To debug this in detail, take a look at Firebug.