I have some script like this:
$("#button").click(function () {
alert("before");
$.post("doAction.aspx?id=hotel", {},
function (response) {
});
alert("after");
return false;
});
the $.post is not firing. I really don’t know what the error is. I used the same script elsewhere and it worked fine. pls help out.
if the alert(“before”) is firing and you don’t have any JS errors in your development console in the browser then the $.post is also firing. I would expect that you get an error response and since you haven’t provided a handler ($.post doesn’t allow you to do that) then it will simply be consumed and disregarded. Try changing to
I’d believe you get into the error handler then