Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('.[class_name]').submit(function(e){
- var writeData = $('.[class_name]');
- $.ajax({
- type: writeData.attr('method'),
- url: writeData.attr('action'),
- data: writeData.serialize(),
- success: function(response){
- //reset the form
- $('.[class_name]')[0].reset();
- //call function for Get Request to refresh with new data
- [function_name]();
- }
- });
- e.preventDefault();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement