Skip to main content
deleted 1 character in body
Source Link
superluminary
  • 48.6k
  • 26
  • 153
  • 149
$(function() {
  $('form.my_form').submit(function(event) {
    event.preventDefault(); // Prevent the form from submitting via the browser
    var form = $(this);
    $.ajax({
      type: form.attr('method'),
      url: form.attr('action'),
      data: form.serialize()
    }).done(function(data) {
      // Optionally alert the user of success here...
    }).fail(function(data) {
      // Optionally alert the user of an error here...
    });
    event.preventDefault(); // Prevent the form from submitting via the browser.
  });
});
$(function() {
  $('form.my_form').submit(function(event) {
    var form = $(this);
    $.ajax({
      type: form.attr('method'),
      url: form.attr('action'),
      data: form.serialize()
    }).done(function(data) {
      // Optionally alert the user of success here...
    }).fail(function(data) {
      // Optionally alert the user of an error here...
    });
    event.preventDefault(); // Prevent the form from submitting via the browser.
  });
});
$(function() {
  $('form.my_form').submit(function(event) {
    event.preventDefault(); // Prevent the form from submitting via the browser
    var form = $(this);
    $.ajax({
      type: form.attr('method'),
      url: form.attr('action'),
      data: form.serialize()
    }).done(function(data) {
      // Optionally alert the user of success here...
    }).fail(function(data) {
      // Optionally alert the user of an error here...
    });
  });
});
added 16 characters in body
Source Link
superluminary
  • 48.6k
  • 26
  • 153
  • 149
$(function() {
  $('form.my_form').submit(function(event) {
    var form = $(this);
    $.ajax({
      type: form.attr('method'),
      url: form.attr('action'),
      data: form.serialize()
    }).done(function(data) {
      // Optionally alert the user of success here...
    }).fail(function(data) {
      // Optionally alert the user of an error here...
    });
    event.preventDefault(); // Prevent the form from submitting via the browser.
  });
});
(function($) {
  $.fn.autosubmit = function() {
    this.submit(function(event) {
      event.preventDefault();
      var form = $(this);
      $.ajax({
        type: form.attr('method'),
        url: form.attr('action'),
        data: form.serialize()
      }).done(function(data) {
        // Optionally alert the user of success here...
      }).fail(function(data) {
        // Optionally alert the user of an error here...
      });
    });
    return this;
  }
})(jQuery)
$(function() {
  $('form.my_form').submit(function(event) {
    var form = $(this);
    $.ajax({
      type: form.attr('method'),
      url: form.attr('action'),
      data: form.serialize()
    }).done(function() {
      // Optionally alert the user of success here...
    }).fail(function() {
      // Optionally alert the user of an error here...
    });
    event.preventDefault(); // Prevent the form from submitting via the browser.
  });
});
(function($) {
  $.fn.autosubmit = function() {
    this.submit(function(event) {
      event.preventDefault();
      var form = $(this);
      $.ajax({
        type: form.attr('method'),
        url: form.attr('action'),
        data: form.serialize()
      }).done(function() {
        // Optionally alert the user of success here...
      }).fail(function() {
        // Optionally alert the user of an error here...
      });
    });
    return this;
  }
})(jQuery)
$(function() {
  $('form.my_form').submit(function(event) {
    var form = $(this);
    $.ajax({
      type: form.attr('method'),
      url: form.attr('action'),
      data: form.serialize()
    }).done(function(data) {
      // Optionally alert the user of success here...
    }).fail(function(data) {
      // Optionally alert the user of an error here...
    });
    event.preventDefault(); // Prevent the form from submitting via the browser.
  });
});
(function($) {
  $.fn.autosubmit = function() {
    this.submit(function(event) {
      event.preventDefault();
      var form = $(this);
      $.ajax({
        type: form.attr('method'),
        url: form.attr('action'),
        data: form.serialize()
      }).done(function(data) {
        // Optionally alert the user of success here...
      }).fail(function(data) {
        // Optionally alert the user of an error here...
      });
    });
    return this;
  }
})(jQuery)
added 22 characters in body
Source Link
superluminary
  • 48.6k
  • 26
  • 153
  • 149
(function($) {
  $.fn.autosubmit = function() {
    this.submit(function(event) {
      event.preventDefault();
      var form = $(this);
      $.ajax({
        type: form.attr('method'),
        url: form.attr('action'),
        data: form.serialize()
      }).done(function() {
        // Optionally alert the user of success here...
      }).fail(function() {
        // Optionally alert the user of an error here...
      });
      event.preventDefault(});
    });return this;
  }
})(jQuery)
(function($) {
  $.fn.autosubmit = function() {
    this.submit(function(event) {
      var form = $(this);
      $.ajax({
        type: form.attr('method'),
        url: form.attr('action'),
        data: form.serialize()
      }).done(function() {
        // Optionally alert the user of success here...
      }).fail(function() {
        // Optionally alert the user of an error here...
      });
      event.preventDefault();
    });
  }
})(jQuery)
(function($) {
  $.fn.autosubmit = function() {
    this.submit(function(event) {
      event.preventDefault();
      var form = $(this);
      $.ajax({
        type: form.attr('method'),
        url: form.attr('action'),
        data: form.serialize()
      }).done(function() {
        // Optionally alert the user of success here...
      }).fail(function() {
        // Optionally alert the user of an error here...
      });
    });
    return this;
  }
})(jQuery)
added 295 characters in body
Source Link
superluminary
  • 48.6k
  • 26
  • 153
  • 149
Loading
added 12 characters in body
Source Link
superluminary
  • 48.6k
  • 26
  • 153
  • 149
Loading
added 804 characters in body
Source Link
superluminary
  • 48.6k
  • 26
  • 153
  • 149
Loading
spelling
Source Link
superluminary
  • 48.6k
  • 26
  • 153
  • 149
Loading
added 35 characters in body
Source Link
superluminary
  • 48.6k
  • 26
  • 153
  • 149
Loading
added 170 characters in body
Source Link
superluminary
  • 48.6k
  • 26
  • 153
  • 149
Loading
Improved layout
Source Link
superluminary
  • 48.6k
  • 26
  • 153
  • 149
Loading
Improved description of problem
Source Link
superluminary
  • 48.6k
  • 26
  • 153
  • 149
Loading
Source Link
superluminary
  • 48.6k
  • 26
  • 153
  • 149
Loading