Archive for September, 2011
Calling a Handler (.ashx) from jQuery in two ways :
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; }
Read Full Post | Make a Comment ( None so far )Validate Required fields on submit
function validate(){ //1-get all input with attr (isReq=true) //2-check if the input contain data. //-2a-if it contain data set req control to display ” else display * var ctrlId = ”; $.each($(‘:input’), function(Index, ctrl) { if (ctrl.isReq == ‘true’) { //get the control id and see if it has any data ctrlId = ctrl.id; var [...]
Read Full Post | Make a Comment ( None so far )