codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Chat</title>
<script language="javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
setInterval(function() {
$("#refresh").load(location.href+" #refresh>*","");
}, 1000);
</script>

</head>
<body onload="refresh();">


<div align="center" id="refresh">


<div class="chat" align="left">

<?php
echo $while_della_chat;
?>
</div>


</div>

<script>
var h = 0;
try {
h = parent.chatview.document.body.offsetHeight + 1000;
}
catch(e) {
h = 0;
}
parent.chatview.scroll (0, h);

window.setTimeout("document.location=´chat.php?l=1´", 10000);

</script>

 </body>
</html>
Questo è il codice sistemato un pò meglio, spero. Quanto alla pagina al momento è dentro un login riservato per cui non posso postarla.