I need to reload the page after I update my database via ajax. In my ajax post method, I have something like the following:
success: function (data) { ....(some code doesn't matter) document.location.reload(); ....(some other code I wish to execute after document is reloaded) } However, the code after reload() will be executed first and then page will reload. What am I doing wrong?