PDA

View Full Version : How to receive JSON data on opening a URL



IAMTubby
October 5th, 2014, 10:22 PM
Hello,
Say there is a URL which gives me JSON data coming from the server. In my javascript, I would like to read this JSON data, parse it and show to the user as HTML.

I'm okay with reading a JSON file from the local file system, but how do I read the data coming from the server? Do I perform an HTTP GET/POST?(I've only heard people saying about these and have never explored it). Can you give me an example or point me to a resource which could get me started?

Thanks.

ofnuts
October 6th, 2014, 01:04 PM
http://en.wikipedia.org/wiki/Ajax_%28programming%29
http://en.wikipedia.org/wiki/AJAJ

IAMTubby
October 6th, 2014, 06:36 PM
http://en.wikipedia.org/wiki/Ajax_%28programming%29
http://en.wikipedia.org/wiki/AJAJ
Thanks ofnuts, let me try these out.