Last updated May 20, 2010. Created by yajnin on May 3, 2010.
Edited by heyrocker. Log in to edit this page.
// #### COMMENT.SAVE
// Releases
// // # SERVICES 6.x-2.0 and JSON SERVER 6.x-2.0-alpha1// + + Comment Object
var comment_object = {
"nid": 123, // Required, set appropriately
"comment": "Hello World!", // Required
"cid": 0, // Set to 0, or do not include for new comment // For edit, set CID appropriately
"subject": "My comment", // Do not include for blank subject
"uid": 1 // Do not include for anonymous comment
};// + + Data Object
// This data object is the instruction between your Drupal Services Server
// // Example of how to implement this is in the next code box below
var data: {
"method": "comment.save",
"comment": comment_object
}; // #### Calling the Request
JSON
http://drupal.org/node/522942
JSONP
http://drupal.org/node/791922// #### 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