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. Link to comment https://forums.phpfreaks.com/topic/47516-ajax-response-question/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.