I do an Ajax check on the server, no matter what happens there, the answer is either "0" or "1", with "0" the form should not submit, my code is as follows:
$('form[name=gform]').submit(function(){ guest =$('#guest').val(); $.ajax({ url: "do.php", type: "POST", async: false, data: { action: 'guest', guest: guest }, success: function(data) { if (data==0) { return false; } } }); });
Unfortunately, the submit occurs anyway, how to prevent it? As you can see, return false did not save me.