i have a $.ajax function that POSTS a data.
i have success: function(){alert("successflly posted")}
i check Firebug console, ajax request is POSTED and completed successfully, hOWEVER, the alert message never fires.
i have a $.ajax function that POSTS a data.
i have success: function(){alert("successflly posted")}
i check Firebug console, ajax request is POSTED and completed successfully, hOWEVER, the alert message never fires.
There's probably some error. Try setting the error callback:
error: function(httpRequest, textStatus, errorThrown) {
alert("status=" + textStatus + ",error=" + errorThrown);
}
That may tell you why it's not working
A great suggestion by Philippe.
You could also try setting breakpoints/watches in firebug to see where your code is actually going (or not going).
You can also try the $.post() method, which is a wrapper for the more complicated $.ajax() method.
Would you mind posting the entire block of code here? A couple of quick notes- if you are using firebug, you don't need to use the alert() method, instead, use console.log()
hi. I have the same problem here...
Philippe your error handler is good idea, but it does not fire either.
I am using Firefox 3.5.3, Firebug
$.ajax({
type: 'POST',
url: "ajax/AjaxPublic.ashx",
data: "action=login&lemail=" + lemail + "&lpass=" + lpass,
success: function(RESULT) { // some alert here }
error: function(httpRequest, textStatus, errorThrown) {
alert("status=" + textStatus + ",error=" + errorThrown);
}
I think it is something simple, but still any ideas would be appreciated.
Thanks