TinyMCE:API/tinymce.util.JSONRequest/sendRPC
From Moxiecode Documentation Wiki
Contents |
[edit]
Method: sendRPC (static)
[edit]
Summary
Simple helper function to send a JSON-RPC request without the need to initialize an object. Consult the Wiki API documentation for more details on what you can pass to this function.
[edit]
Syntax
<void> sendRPC(<Object> o)
[edit]
Parameters
- o
- Call object where there are three field id, method and params this object should also contain callbacks etc.
[edit]
Examples
tinymce.util.JSONRequest.sendRPC({
url : '/somepage.php',
method : 'someMethod',
params : [1, 2, 'a'],
success : function(result) {
// JSON RPC result
console.dir(result);
},
error : function(e, x) {
// Handle error
alert('Error!');
}
});
