JavaScript - JSON Server & Request.JSONP (MooTools Example)
// Modules
// // # SERVICES 6.x-2.0 and JSON SERVER 6.x-2.0-alpha1
// + + Data Object
Node.Save (and edit)
http://drupal.org/node/774116
Comment.Save
http://drupal.org/node/788892
// + + Services Request
Note: officially JSON Server does not support JSONP.
**Cross-domain data is a tricky business. Caution is advised.**
Do not use JSONP unless you understand the risks and are clear about what is required for proper security.
Most people just need this... Request.JSON
http://drupal.org/node/522942
Simple JSON is supported. And advised for most projects.
PARTICULARLY for JavaScript, which is completely exposed to the browser.
Now, if you've made it this far, get it, and have a valid use-case -- well *high five* :)
JSONP ftw.
Unofficially, you can make JSONP work fairly easily:
http://groups.drupal.org/node/24372#comment-101092 (+ subsequent comments)
To lobby to have JSONP supported for those with use-case based needs, please join the discussions in JSON Server regarding JSONP:
http://drupal.org/node/624898
http://drupal.org/node/598358
// + + JSONP Services Request
var request = new Request.JSONP({
url: 'http://yourdomain.com/services/json',
data: data
onComplete: function(response){
console.log(response)
}
}).send();
// #### Reference: Services & JavaScript
JavaScript - Node.Save & Edit // Cross-method Insights
http://drupal.org/node/774116
JavaScript - CCK Fields in the Node Object // Cross-method Insights
http://drupal.org/node/776122
JavaScript - Comment.Save
http://drupal.org/node/788892
JavaScript - JSON Server // Request.JSON (MooTools Example)
http://drupal.org/node/522942
JavaScript - JSON Server // Request.JSONP (MooTools Example)
http://drupal.org/node/791922
// #### Discussion regarding JSONP
// PLEASE SPEAK UP!