I spent hours today to find the solution of my problem. I have a from which has tag onsubmit="return checking();". the checking() function will do the input validation.
function checking(){
    var filename = $("#filename").val();
    $.ajax({
        type: "POST",
        url: url,
        data: $(".myform").serialize(),
        success: function(data){
            if(data == "something"){
               return true;
            }
            else{
               return false;
            }
        }
    });
return false;     // this will trigger my onSubmit
}
but this one is not working because the return value which is true or false is inside the $.ajax function. So how can I trigger the onsubmit in my form?
Thanks in advance!
 
     
    