Eric Zwar
asked on
Trouble handling jquery json response
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.