Solved

Handle Success from AJAX call

Posted on 2013-05-10
3
351 Views
Last Modified: 2013-05-10
I would like to handle a successful return from the submit below and reload the current page. How can i best achieve this?

           

         $('#modal-confirm').click(function() {
            $(form).ajaxSubmit();
            $(form).resetForm();
            $('#myModalOne').modal('toggle');


        });

Open in new window



Thanks
0
Comment
Question by:WalterRR
  • 2
3 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
Comment Utility
$(document).ajaxSuccess(function() { // http://api.jquery.com/ajaxSuccess/
     location.realod();
})
$('#modal-confirm').click(function() {
            $(form).ajaxSubmit();
            $(form).resetForm();
            $('#myModalOne').modal('toggle');
});

Open in new window

0
 

Author Closing Comment

by:WalterRR
Comment Utility
Thanks very much...!
0
 
LVL 82

Expert Comment

by:leakim971
Comment Utility
you're welcome!
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now