I'm trying to setup a ajax structure in my HTML form and I'm getting an error "syntax error - line 1" in my AjaxServer.php file. The file has nothing in it yet except a test string to make sure I have all my ajax code working in my form.
PHP script on the Server side (can't get much simpler than this):
My form ajax code in the JS section which also can't get much simpler than this:
$php_return_status = "test";
I get the JS dialog box ok which displays "Test" but I'm also getting a Firefox Error Console display of "Syntax error - line 1" and an arrow pointing to the word 'test'.
http.open('get', 'Server.php', true);
http.onreadystatechange = returnAjaxData;
if (http.readyState == 4)
if (http.status == 200)
var response = http.responseText;
alert("Ajax error: " + http.statusText);
Does anyone know what might be causing this error?
(Note I'm electing to return ASCII data from my ajax call which is allowed.)