it is suppost to be a chat room that refreshes its self after 30 seconds....
The problem is that when i type a message and press say nothing appears...so could someone tell me what to do to this script...
<div align="center">
<tr valign="top" height="1%"><td colspan="3" align="left"><font size="-2" color="#AAAAAA"> 12:22:35 Logged in as <i>Viper</i> (<a href="/chat.php?logout=1">logout</a>)</i></font></td><td colspan="5" align="right"><p id="d" class="dt"><br></p></td></tr>
<tr height="1%" align="center"><td colspan="7"><b><font size=-2>Guests are not allowed to talk. Nothing will show.</font></B></td></tr>
<form method="post" name="cr"><tr height="1%" align="center"><td colspan="7"> <input type="text" name="add" size="30"> <input type="submit" value="say"></td></tr></form>
<script language="Javascript">
document.cr.add.focus();
var fcs=1;
var c=0;
id=window.setTimeout("refresh();",1000);
function setstatus(status){
fcs=status;
}
function pm(user){
if(user=="Guest") document.cr.add.value='/me '+document.cr.add.value; else document.cr.add.value='/pm '+user+' '+document.cr.add.value;
document.cr.add.focus();
}
function refresh() {
if (document.cr.add.value==""){
with (window){
if (c<30){
status="Refresh in "+(30-c)+" seconds";
c++;
id=window.setTimeout("refresh();",1000);
} else status="Refreshing";
if (c>29) location="/chat.php";
}
}else{
window.status="";
c=0;
}
}
</script>
<tr height="1%" align="center"><td colspan="7"><a href="/chat.php">reload</a><br>
<font size=-2>(Reloads automatically if idle for 30 seconds)</font></font></td></tr><tr><td> </td></tr>
</table><br></div>
</BODY>
</BODY>