AJAX = Asynchronous JavaScript And XML AJAX is a client-side script which is used to communicate to the server. It is used to get or submit the data or update the part of the webpage without refresh the page. When we want to submit a form, first we get the form data using serialize method following code:- var datastring = $("#create-from").serialize(); If want to send custom data then, var datastring = {name:"ABC",email:"abc@gmail.com"} Now we will submit the form data using ajax $.ajax({ type:'POST', url:'asySubmit.php', data:datastring, beforeSend: function(){ $('.loader').show(); }, success:function(response) { console.log(response); }, ...
Comments
Post a Comment