you will need to do something like
HTML Code:
<script type="text/javascript">
var counter = 1;
var timer=setTimeout("LoadNewRecord()",5000);
function LoadNewRecord()
{
// Use ajax here to call another page which will take as parameter counter
// and will return the appropriate record (as rendered html) from the database
// something like
Ajax.get("dbreader.php?counter=" + counter, callbackfunction_once_ajax_completes);
counter++;
timer=setTimeout("LoadNewRecord()",5000);
}
function callbackfunction_once_ajax_completes()
{
// get the response from the ajax
// and display it in the html
var contents = <the response from the ajax object>;
var mydiv = document.getElementById("theIDofyourDIV");
mydiv.innerHTML = contents;
}
</script>
a bit primitive .. but it is to get an idea ..
Bookmarks