Currently got chat box done with scrollbar using CSS3’s overflow-y:auto thing.
The code makes the pages scrollbar position start at the bottom if left unedited, but I can’t get it to do just do it for the chat box (div id=”site_chat_box”)
Unedited:
[CODE]<script language=”JavaScript”>
function ScrollToBottom()
{
window.scroll(0,window.screen.availHeight);
setTimeout(‘ScrollToBottom()’, 500);
}
setTimeout(‘ScrollToBottom()’, 500);
</script>
Edited:
[CODE]<script language=”JavaScript”>
function ScrollToBottom()
{
document.getElementById(“site_chat_box”).scroll(0,document.getElementById(“site_chat_box”).availHeight);
setTimeout(‘ScrollToBottom()’, 500);
}
setTimeout(‘ScrollToBottom()’, 500);
</script>
Any help would be great!
Thanks,
otester