Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- Live table update using AJAX


Fotiman - 1:20 pm on May 23, 2012 (gmt 0)


Is there an error message that might indicate what is wrong? It's been a while since I've done any PHP, so perhaps I have the quotes wrong. But I think it's probably a problem with the { } characters. Maybe give this a try in place of the current echo line:

$arr = array("balance" => number_format($balance,2), "class" => $class);
echo json_encode($arr);

Also, replace the "Missing id" bit with this:

$arr = array("error" => "Missing id");
echo json_encode($arr);


Thread source:: http://www.webmasterworld.com/javascript/4456322.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com