jQuery/Ajax/javascript in FireFox Error when using $.post/$.get

Posted by IsenGrim on Stack Overflow See other posts from Stack Overflow or by IsenGrim
Published on 2009-10-12T02:44:59Z Indexed on 2010/05/11 9:04 UTC
Read the original article Hit count: 265

Filed under:
|
|

uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE)" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://localhost/scripts/jQuery.js :: anonymous :: line 808" data: no]

Line 0

is the error i get when i bring up firebug. This only happens in firefox (and maybe other browsers) but the code works fine in IE8.

I have codes like this in jquery:

$("#Logout").live("click", function (e) {
  e.preventDefault(e);
  $.post("/logout.php", {}, function () {
    //--a bunch of animations--//
    window.location = "/login.php";
  }
});

I have no idea whats wrong as even the error message is not helpful at all..

inside logout.php:

<?php
  session_start();
  session_destroy();
?>

Also dont work if I used GET or inserted phantom data. Or is there a more elegant way to do this?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about AJAX