开发者

Reading JSON sent by PHP in an extjs file

开发者 https://www.devze.com 2023-01-26 00:39 出处:网络
I\'m new to extjs and I have a problem. I send JSON from PHP using echo. When I send static HTML it\'s ok, but when I send an en开发者_如何学运维coded JSON string I have a result like this shown:

I'm new to extjs and I have a problem. I send JSON from PHP using echo. When I send static HTML it's ok, but when I send an en开发者_如何学运维coded JSON string I have a result like this shown:

{account:blablabla, amount:blablabla}

What can I do?


I'm guessing you're having problems because you haven't included the property values in single quotes. blablabla will likely blow up your JavaScript engine. Or are you trying to figure out how to get JavaScript to actually interpret the JSON object? Use eval, also, read the ExtJs documentation, they have examples.

0

精彩评论

暂无评论...
验证码 换一张
取 消