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()