Skip to content Skip to sidebar Skip to footer

Javascript: Detect Form Submission Completion

I have a form in an iframe and submit it. How can I tell when the submission completes? I'm using jQuery to submit the form but don't think there's a callback: $('#myForm').submit(

Solution 1:

Submission of the form will redirect you to the next page.

But you can always try the ajax function

http://api.jquery.com/jQuery.ajax/

Adding callback is as easy as

 $.ajax({
   url: "page.php",
   success: function() {
      doWhateverYouWant();
   }
 });

Solution 2:

If you submit a form, it goes to the next page, so there's nothing else that executes on that page.

Post a Comment for "Javascript: Detect Form Submission Completion"