Hey! I am making a chat program. I have a function Chat();
function Chat(){
var fullMessage = document.getElementById('name').innerHTML +' '+ document.getElementById('message').value+'\n';
fullMessage = fullMessage.replace(/\\'/g,"'");
fullMessage = fullMessage.replace(/\\"/g,""");
fullMessage = fullMessage.replace(/\[/g,'*lsb?');
fullMessage = fullMessage.replace(/\]/g,'*rsb?');
sendRequest('http://3rlend.com/pjattappend.php','F=allMessages.txt&D='+'fullMessage','POST',true);
document.getElementById('message').value="";
}
sendRequest(url,params,method,Asynch); i an AJAX function.
Now when I try to execute Chat();, there comes an error in FireBug; Chat is not defined! But Chat is defined!
And when I try to execute Chat(); in the address line by writing javascript:Chat();
, then this error comes:
Chat is not defined (204 out of range 90) Chat is not defined
What does this error mean?
You can test it here: http://3rlend.com/pjatt/ .
You need to sign in to test it, so usernamepassword:
Testertesting
Then the script is loaded.
EDIT:
I found out that every single function that is written after function HandleRequest(Data,url); is not defined!
EDIT2: Found the problem after counting the bracets!:icon_redface: