Is it maybe generating an error? Try converting to a .ajax call so that
you've got access to the error method handlers.

-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rage9
Sent: Monday, November 24, 2008 3:43 PM
To: jQuery (English)
Subject: [jQuery] Callback on $.Post not firing


This is driving me loopy.  Simple post, trying to get a result back
from the server.  Heck even copied it from the documentation and the
callback just will not fire, but the post works fine:

var answer = confirm("Delete Selected?");
                if (answer){
                        $.post("test.php", { name: "test" }, function(data){
                        alert("popped off!");
                         alert(data.name); // John
                         console.log(data.time); //  2pm
                        }, "json");
                }

PHP:

<?php

echo json_encode(array("name"=>"John","time"=>"2pm"));

?>

I also tried with XML with no luck either.  Firebug doesn't seem to
show a response, but I know the post variables are passed just fine,
because I wrote a logger [not included] to tell me what the variables
where being passed.  No dice on the return info.  Tried this with both
firefox and opera and in neither the call-backe worked.

Ideas?


Reply via email to