Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

refresh page and run function after javascript

window.onload = function() {
    var reloading = sessionStorage.getItem("reloading");
    if (reloading) {
        sessionStorage.removeItem("reloading");
        myFunction();
    }
}

function reloadP() {
    sessionStorage.setItem("reloading", "true");
    document.location.reload();
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #refresh #page #run #function #javascript
ADD COMMENT
Topic
Name
3+8 =