I have a call to a page which I call as follows:-
include_once('status.controller.php');
I want to call this function every 5 seconds, so it re-runs the scripts without refreshing the whole page.
How can I do this?
I've tried:-
var interval = 4800;
setInterval(function() {
$.get('status.controller.php', function(data) {
//do something with the data
alert('Load was performed.');
});
}, interval);
but it doesn't appear to be re-running the scripts on the page as it is not updating the session variables as it should be.