Calling a Handler (.ashx) from jQuery in two ways :

Posted on 07/09/2011. Filed under: JQuery |


function SendForm() {
var formSerialize=”;

formSerialize = $(‘input:text’).serialize();

alert("formSerialize=" + formSerialize);

var selectedDiv = $("#selcProcedure").find(‘:selected’).val();

$.post("leaveProceduresHandler.ashx?StrMethodName=SendForm&selectedDiv=" + selectedDiv + "&"

+formSerialize, function (response) { $("#divId_AllForms").html(response); });
 
return false;
}

function SubmitForm() {
              $.ajax({
                  url: "leaveProceduresHandler.ashx?StrMethodName=IsValid",
                  success: OnComplete,
                  error: OnFail
              });
              return false;
          }

Advertisement

Make a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Liked it here?
Why not try sites on the blogroll...

Follow

Get every new post delivered to your Inbox.