My html contains different images, without any legality - all located under some table. For example homepage.htm:
<table id="imagesTable">
<tr>
<td>
<img src="img1.png">
<div>
<img src="img2.png">
</div>
</td>
<td>
<div>
<div>
<img src="img3.png">
</div>
</div>
</td>
</tr>
</table>
The images sources in this page can be different every time I'm getting the page (but all other elements structure stays as is) and I want to update the page every 5 sec and update the new images instead of the old one (without refreshing the page). I tried to implement it with the following approach (without success):
function updatePage()
{
$("#imagesTable").load("homepage.htm #imagesTable");
window.setTimeout("updatePage()",5000);
}
...
<body onload="updatePage();">
....
any idea what I'm doing wrong? any other suggestions how to solve this issue?
setTimeout(updatePage,5000);instead. Do you have any errors?