Posted under » JavaScript on 22 March 2013
Let's say you want to refresh the page every 3 seconds. There are many ways to do this. This is but just one way.
window.onload = function() { setTimeout("window.location.reload();", 30000); }
There are 3 parts to this.
To execute a JavaScript function, say sortList, immediately after a page has been loaded
<body onload="sortList()">
If you don't want to clutter your body tag, you can put this at the end of your JS, eg.
window.onload = sortList(); </script>