Wrapped Request with automated sending and receiving of JavaScript Objects in JSON Format.
var myJSONRemote = new Request.JSON([options]);
Fired when the request completes. This overrides the signature of the Request success event.
onSuccess(responseJSON, responseText)
//This code will send a data object via a GET request and alert the retrieved data. var jsonRequest = new Request.JSON({url: "http://site.com/tellMeAge.php", onComplete: function(person){ alert(person.age); //Alerts "25 years". alert(person.height); //Alerts "170 cm". alert(person.weight); //Alerts "120 kg". }}).get({'firstName': 'John', 'lastName': 'Doe'});
This documentation is released under a Attribution-NonCommercial-ShareAlike 3.0 License.