Trouble handling jquery json response

Eric Zwar
Eric Zwar used Ask the Experts™
on
Hi, I have a PHP script which calls another PHP script via a jQuery ajax call.  I can see that the call is successful and that there is a proper response from the network activity.  However I am having trouble processing that response in the calling PHP/JavaScript code.

Here's my attempt:

demo.html

From the network activity I see the response is:

["data1","data2"] and this is what I am expecting (actual data not shown)

But I cannot 'see' nor process these data in the success data in the calling code shown above.  The alerts do not fire.

Any guidance will be most appreciated and thank you in anticipation.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
Found the issue.

The called PHP program had some JavaScript in it and this was also being returned in the response for some reason unknown to me.  Once I removed that JavaScript the ajax response was OK and I can process it.
Found the issue.

 The called PHP program had some JavaScript in it and this was also being returned in the response for some reason unknown to me.  Once I removed that JavaScript the ajax response was OK and I can process it.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial