i am trying to submit a form using jquery and ajax. The form gets submitted without going to the url through ajax and values are entered successfully in DB if all entries are correct and validated. also it does not updated the DB if any errors.
here is the javascript $(document).ready(function(){ $('#regist').submit(function(e) { $.ajax({ type: "POST", url: "submit1.php", data: $('#regist').serialize(), dataType: "json", success: function(){ $("loading").append("<img id='checkmark' src='images/check.png' / >"); } }); return false; e.preventDefault(); }); }); But i cannot work out the success event in ajax..anything i insert into success event does not work...any help would be appreciated..thanks