0

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:

Edited by ErlendHL: Found out!

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by ErlendHL
0

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

0

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!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.