views:

39

answers:

1

This works in FF, but not in IE 7 and 8. Is there anyway to make it work in IE?

setInterval(function() {
    $("#content").load(location.href+" #content>*","");
}, 5000);

(this code is from http://blog.mediasoft.be/partial-page-refresh-with-ajax-and-jquery/)

A: 

I'm not sure what the last "" is, but it can be left off, IE may have trouble with the empty data param:

setInterval(function() {
    $("#content").load(location.href+" #content>*");
}, 5000);
Nick Craver
Actually that's for the oncomplete function. I actually don't have it empty, I have a function specified, but still doesn't work in IE.
Prabhu
@Pravhu - if you want help here you need to post your actual code, if you're changing the code you may or may not be including the actual issue...or creating other ones making the answers to your questions invalid.
Nick Craver
@Prabhu then you'll have to do some debugging. Is the function fired in the first place (use alert() to find out?) Does the Ajax request fire (Use IE8's developer tools to find out?)
Pekka
Just debugged, and yes it does fire...
Prabhu