Q:

$.post not firing

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.

A:

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 
$.ajax({
            type:'POST',
            url:"doAction.aspx?id=hotel",
            data:{},
            success:function(data){...},
            error:function (xhr, status, errorThrown) {
                console.log(xhr); //could be alert if you don't use the dev tools
            },
            dataType:"json"
        });

I'd believe you get into the error handler then

