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:

Cnet used to do a better job keeping adware/spyware out. Now they seem to be letting people in under the radar. I'm talking about companies with dozens of products loaded with spyware. I don't think that is going to be a good thing down the road as far as consumer confidence. Just my $0.02

Cnet used to do a better job keeping adware/spyware out. Now they seem to be letting people in under the radar. I'm talking about companies with dozens of products loaded with spyware. I don't think that is going to be a good thing down the road as far as consumer confidence. Just my $0.02

Dude, that was totally off-topic!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.