jQuery: 'async: false' Not Working With IE7 / IE6

Posted by Norbert on Stack Overflow See other posts from Stack Overflow or by Norbert
Published on 2011-01-11T19:48:04Z Indexed on 2011/01/11 19:53 UTC
Read the original article Hit count: 293

I created a simple tracking script which adds the users info to a database when the page is unloaded. It works on all browsers except IE7 and IE6.

IE7 gives me errors, but I can't open the "debugger" because I'm using the standalone version (or at least that's what I think the problems is). I removed the async: false, from the script below and I didn't get any errors, but I need async set to false in order for the script to work. Any ideas?

$(window).unload(function() {
  $.ajax({
    type: "POST",
    async: false,
    url: "add.php",
    data: "ip=" + jIp + "&date=" + jDate + "&time=" + jTime,
  });
});

Update:

I got IE7 to display the error, kinda. When I click OK on the dialog on top, it closes both dialogs. Ugh!

alt text

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-ajax