Guest User

Untitled

a guest
Oct 23rd, 2015
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. app = {
  2.     submitForm: function(formID, doReload) {
  3.         $.ajax({
  4.             url: $(formID).attr('action'),
  5.             method: $(formID).attr('method'),
  6.             data: $(formID).serialize(),
  7.             dataType: 'json',
  8.             success: function() {
  9.                 var d = doReload;
  10.                 return function(response) {
  11.                     console.log(d);
  12.                 }
  13.             }()
  14.         });
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment