View Full Version : Problem with Json Response

28 Sep 2013, 1:42 AM
hi all,
i am working in json PHP ,php code was perfect. but when it came to JS Some prefix (5) added to my JSON Response
ex:- 5{ a: 10, b: 20}

5 is not there in my php code .
Please solve my problem.
thanks in advance
vamsi krishna

28 Sep 2013, 8:11 AM
So you're saying that when you view the response in Chrome Developer Tools or Firebug, there is literally a "5" appended to the beginning of the responseText?

If so, that's a server-side issue...perhaps something in your application software is prepending that character. Ext JS (and JavaScript, for that matter), has nothing to do with the format or the content of the response that you receive from an AJAX request. All that Ext JS does is to read the response after it arrives and do whatever you've told it to do with the response.

28 Sep 2013, 10:53 AM
hi sir,
thanks for quick response.:)

Same code i Executed in Office system but it Execute perfectly. But My home only I got this problem
yesterday its came '5' only. but today same code i got '555675456675555' before the json response.

1.Code was Same
2. Xampp Was same version

diff is OS in my office Windows XP 32bit and My System was Windows 8 64bit
please do needful
thanks in advance

vamsi krishna

28 Sep 2013, 11:43 AM
Sorry, no idea. Maybe you can post your PHP code, or post the same question on a PHP forum?

30 Sep 2013, 9:13 PM
at last i found proble this is Xampp Version problem. in my office Xampp 1.7.7 and my house having latest version so some tags are deprecated. that's why its not working.

Thank you for your support.
Vamsi Krishna