function phpJsAjaxPath(url, param, retFunc) { var retObj; $.ajax({ url: url, type: "POST", data: param, dataType: "json", beforeSend: function (x){}, success: function(data){ eval(retFunc+"(data)"); return false; }, error: function(data, e){ data.msg = data.responseText; eval(retFunc+"(data)"); retObj = data; } }); } function phpJsFieldValidation(){ bOK = false; Common.hideGlobalMsg(); $(".error").html("") // reset all error message field $(".textField").each(function(){ bContinue = true; // if ($(this).attr("fieldCompulsory") == 1) { // if ($.trim($(this).val()) == "") { // bContinue = false; // $(this).parent().find(".error").html("Please fill in this field") // } // } if (bContinue) { if ($(this).attr("fieldType") == 1) { if ($(this).val().trim() != "" && !Common.isNumber($(this).val())) { $(this).parent().find(".error").html("Invalid number format") } } else if ($(this).attr("fieldType") == 3) { //$(this).parent().find(".error").html("Invalid Date format") } else { bOK = true; } } bOK = true; }) return bOK; }