疯狂的xhr错误

时间:2011-06-25 01:06:26

标签: php javascript ajax post

Crazy xhr error

另外在服务器端error_log:

PHP Notice:  Undefined index:  theid in /.../postsForExtension.php on line 27

那段代码:

$personid = strip_tags($_POST['theid']);

Note: $personid is true. 

1 个答案:

答案 0 :(得分:2)

我不认为xhr.responsetext包含有效的JSON。因此JSON.parse会出现语法错误。

您的JSON响应是什么样的?