Goose Posted April 18, 2007 Share Posted April 18, 2007 My sites that use AJAX work great and in ordinary browsers I do not see this, but with the Web Developer add-on for firefox I get an error with my AJAX responses. This is the error: Error: syntax error Source File: http://localhost/chat/ajax.php?action=join_room&room=Default&uid=1 1^ Basically if the AJAX response is 1 then the user successfully joined the channel. Is there a different way I should be returning my PHP result to JavaScript? In my php code I am simply doing this echo '1'; and in my JavaScript I am doing something like if(reponse == '1'){ ... If anyone has any advice, I would much appreciate it. Edit: Tried to make my explanation more clear. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.