views:

49

answers:

1

My goal is to asynchronously call a URL via POST request (REST Webservice) to increment a statistic on one of my object.

I am a newby web developer and I discovered JSON yesterday. Since JSON seems a lot popular and handy I went to www.json.org and discovered a JSONRequest object which seems to able one to send POST/GET request asynchronously but I can't get it work.

Is it a global JavaScript object or do I need to add some files ? I am a little bit confused since I've found a Firefox plugin extension for JSONRequest but I don't understand its purpose.

+4  A: 

From the website:

JSONRequest is proposed as a new browser service that allows for two-way data exchange with any JSON data server without exposing users or organization to harm.

The proposal doesn't link to an implementation in JS, so it is nothing more then a proposal which may or may not have implementations in the wild (you found the Firefox plugin).

This isn't something that is usable in the real world.

If you want to deal with JSON and XHR, then YUI and jQuery have helper functions which can do things with JSON automatically. Other libraries probably have similar features.

David Dorward