Lyder godt.
Jeg havde nu troet jeg skulle bruge noget ala:
<script type="text/javascript">
var mycontent=new Array()
mycontent[0]=' <img src="
http://javascriptkit.com/m1.gif"> Learn about JavaScript and get free scripts at <a href="
http://javascriptkit.com">JavaScript Kit!</a>'
mycontent[1]=' <img src="
http://javascriptkit.com/m2.gif"> Visit <a href="
http://dynamicdrive.com">Dynamic Drive</a> for the best DHTML scripts and components on the web!'
mycontent[2]=' <img src="
http://javascriptkit.com/m3.gif"> The <a href="
http://www.cssdrive.com/">CSS Drive</a> CSS gallery and examples.'
mycontent[3]=' <img src="
http://javascriptkit.com/m4.gif"> CodingForums.com- Web coding and development forums'
var i=0
function altercontent(){
if (document.all)
dcontent.innerHTML=mycontent[i];
i=(i==mycontent.length-1)? 0 : i+1
setTimeout("altercontent()", 3000)
}
window.onload=altercontent
</script>
Det jeg vil hente ind i min div på siden er noget php fra en tabel
i min database som kan ændre sig når folk opdaterer informationer.
jeg har følgende div:
<div id="laes">
<?php
include("../dbconnect.php");
$getchat = mysql_query("select * from chat ORDER BY date DESC");
while($r=mysql_fetch_array($getchat)){
extract($r);
echo("<br><b>$navn<p class=\"style1\">$date</p>$tekst</b><br>------------------------------------------<br>");
}
php?>
</div>
det er denne div jeg gerne vil have opdateret hver 5 sekund ....