Armitage2k Armitage2k - 1 year ago 121
Ajax Question

JS - location reload with delay after function executed

I am running a JS / AJAX script to update data in my table and once the script is done, I would like to reload the page. However, with my current code, it reloads immediately, is there any way to delay the reload for 3 secs?

// close modal and refresh page


Answer Source
setTimeout(function(){location.reload()}, 3000);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download