He guys,
Maybe you can help me, i need a code when the page is loaded a function (below)
function update() {
$('#animation').load('/Stream/readLevel');
}
needs to execute, when this action is complete (so the content of the page /Stream/readLevel has been fully loaded the function must be loaded again in a number of seconds (2 seconds).
How can i accomplish this?
Thanks in advance!
As you only want to reload after the contents has been fully loaded you have to set the timer in
successcallback of$.loadfunction like following, otherwise it will send request to server every two seconds irrespect of if the previous ajax request has been completed or not.