missing-score
04-13-2003, 09:14 PM
Right, I have this chatroom that I made with PHP, and krycek suggested that I do something about it to stop the flicker on the iframe.
He made this script...
function chatLoad() {
if (parent.mess.document.readyState == "complete") {
parent.mess.document.location = 'messages.php';
}
timer = window.setTimeout("chatLoad()", 4500);
chatRefresh();
}
chatLoad();
function chatRefresh() {
if (parent.mess.document.readyState != "complete") {
// readyState can be; uninitialized, loading, loaded, interactive, or complete
timer = window.setTimeout("chatRefresh()", 4000);
} else {
var html = parent.mess.document.body.innerHTML;
chat.innerHTML = html;
}
}
mess is the name of my iframe
chat is the name of my div to load the chat into.
It works fine, you can have a look: www.itk-network.com/box, but I would appreciate it if someone could help me make this cross browser compatable. :)
He made this script...
function chatLoad() {
if (parent.mess.document.readyState == "complete") {
parent.mess.document.location = 'messages.php';
}
timer = window.setTimeout("chatLoad()", 4500);
chatRefresh();
}
chatLoad();
function chatRefresh() {
if (parent.mess.document.readyState != "complete") {
// readyState can be; uninitialized, loading, loaded, interactive, or complete
timer = window.setTimeout("chatRefresh()", 4000);
} else {
var html = parent.mess.document.body.innerHTML;
chat.innerHTML = html;
}
}
mess is the name of my iframe
chat is the name of my div to load the chat into.
It works fine, you can have a look: www.itk-network.com/box, but I would appreciate it if someone could help me make this cross browser compatable. :)