Allora la situazione è molto migliorata.. il problema ora è il seguente
All'apertura della chat, il div è al bottom...
ma all'inserimento di un'ulteriore riga e/o messaggio, il div non scrolla ancora giù, ma resta al precedente limite, impostato al caricamento della pagina..
ti riporto il codice aggiornato:
<!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>
<link href="http://91.194.90.196/~gs9b/css/main.css" rel="stylesheet" type="text/css" />
<link href="http://91.194.90.196/~gs9b/css/b/font.css" rel="stylesheet" type="text/css" />
<link href="http://91.194.90.196/~gs9b/css/b/form.css" rel="stylesheet" type="text/css" /><script>
window.onload=function C(){
var varH = document.body.offsetHeight-10;
document.getElementById('page').style.height=varH+'px';
var varA = document.body.offsetHeight-10;
document.getElementById('utenti').style.height=varA+'px';
var varB = document.body.offsetHeight-86;
document.getElementById('messaggi').style.height=varB+'px';
var objChat = document.getElementById("messaggi");
objChat.scrollTop = objChat.scrollHeight;}
</script>
<link href="http://91.194.90.196/~gs9b/immagini/sfondo/favicon.ico" rel="shortcut icon">
<title>Gestisci il tuo profilo in Gayspace</title>
<meta name="keywords" content="gay community gay glbt community chat gay sito gay gratis incontri gay forum gratuito" />
<meta name="description" content="La più grande gay community italiana completamente gratis... Oltre 122.000 utenti ti stanno aspettando" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="googlebot" content="index,follow" />
<meta name="robots" content="ALL" />
<meta name="revisit-after" content="1 days" />
<meta http-equiv="expires" content="0" />
<meta name="verify-v1" content="k4Gfd+QPH+r7hShS9zxz/dX7crSP1zDFjJbTWL0b+CE=" />
<link rel="shortcut icon" href="http://91.194.90.196/~gs9b/immagini/background/favicon.ico" />
<link rel="apple-touch-icon" href="http://91.194.90.196/~gs9b/immagini/background/icona_iphone.png">
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-16874530-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script><script src="http://prototypejs.org/assets/2009/8/31/prototype.js"></script>
</head>
<body class="body_b">
<div class="container" style="overflow:hidden">
<div class="page_text">
<div class="page" style="width:1002px; background-color:#066333">
<div id="page" style="margin:2px 0px 0px 4px; width:800px; float:left; height:">
<div id="area_messaggi" class="chat_ok_b" style="margin-bottom:5px; width:800px; clear:both; height:">
<div id="messaggi" style="width:796px; overflow-y:scroll; overflow-x:hidden; padding:2px; float:left; height:">
[...]
</div>
</div>
<div class="chat_ok_b" style="width:796px; height:61px; clear:both; padding:2px">
<iframe class="chat_ok_b" style="border:hidden" width="796" height="61" marginheight="0" marginwidth="0" scrolling="no" frameborder="0" src="testo.php"></iframe>
</div>
</div>
<div id="utenti" class="chat_ok_b" style="margin:2px 0px 0px 5px; width:191px; float:left; height:">
<div id="utenti" style="width:40px; height:40px; float:left">
<div style="height:13px; padding:5px; width:181px; clear:both; border-bottom:1px solid #ffffff; background-color:#7b9dc4"><font class="b12"><strong>Stanza Principale</strong></font></div>
<div style="width:191px; clear:both">
<div style="height:20px; margin:0px 2px 0px 2px; width:15px; float:left; background-image:url(http://91.194.90.196/~gs9b/immagini/chat/ruolo_1.png)"></div>
<div style="height:20px; width:20px; float:left; border-left:1px solid; border-bottom:1px solid; overflow:hidden"><img style="margin-top:-5px; margin-left:-0px; overflow:hidden" src="http://www.************/foto_profilo/M/marco1986/thumb/103785.png" width="20" height="29" />
</div>
<div style="height:14px; width:144px; padding:3px; float:left; border-left:1px solid; border-bottom:1px solid; background-image:url(http://91.194.90.196/~gs9b/immagini/chat/ruolo_bg_1.png)"><font class="b10">Marco1986</font></div>
</div>
<div style="width:9px; height:3px; clear:both; overflow:hidden"></div>
<div style="width:191px; height:1px; background-color:#ffffff; clear:both; overflow:hidden"></div>
<div style="height:13px; padding:5px; width:181px; clear:both; border-bottom:1px solid; background-color:#7b9dc4"><font class="b12"><strong>Sex Room</strong></font></div>
<div style="width:9px; height:3px; clear:both; overflow:hidden"></div>
<div style="width:191px; height:1px; background-color:#ffffff; clear:both; overflow:hidden"></div>
<div style="height:13px; padding:5px; width:181px; clear:both; border-bottom:1px solid; background-color:#7b9dc4"><font class="b12"><strong>Junior Room</strong></font></div>
<div style="width:9px; height:3px; clear:both; overflow:hidden"></div>
<div style="width:191px; height:1px; background-color:#ffffff; clear:both; overflow:hidden"></div>
<div style="height:13px; padding:5px; width:181px; clear:both; border-bottom:1px solid; background-color:#7b9dc4"><font class="b12"><strong>Staff Room</strong></font></div>
</div>
</div>
</div>
</div>
</div>
<script type="text/JavaScript">
Event.observe(window, 'load', function(){new Ajax.PeriodicalUpdater('messaggi', 'messaggi.php', {method: 'post', frequency: 0.5});})
Event.observe(window, 'load', function(){new Ajax.PeriodicalUpdater('utenti', 'utenti.php', {method: 'post', frequency: 0,5});})
</script>
</body>
</html>