This is an auto-generated topic for
SIMPLX_RPC 0.5.1-rc2 by larscwallin.
SIMPLX RPC - Ajax made really easy
Brief Description:
UPDATE rc2
Much improved docs.
Added option to turn on/off Snippet matching in the console.
WHATS THIS SNIPPET ANYWAY?
SIMPLX RPC is a remote method invocation Snippet which makes it possible to call the ModX API from the client browser using XMLHTTP or similar. This means that you can fetch (for now...) data from ModX without reloading the page. This means more interactive, dynamic, responsive, personal web sites

The RPC (Remote Procedure Call) capability has been missing for too long in ModX i think. Well it turned out to be a real piece of cake to code it (much thanks to the simplicity of the ModX API but also thanks to the built in support for json in PHP). So here you are

This Snippet simply wraps the modx API (
http://wiki.modxcms.com/index.php/Ja:API:DocumentParser) with the json-rpc protocol (
http://groups.google.com/group/json-rpc/web/json-rpc-1-2-proposal). It should match the documented API spot on i think.
Note that this implementation uses named parameters. This means that the parameters collection must be represented as a JavaScript object with key/value pairs. This ensures that parameter sequence is not an issue when calling in method calls.
WHY DID I MAKE THE SNIPPET?
Well because it was the simplest and most plug-n-play way to do it. Using Modx Connectors would in some cases be a better options, but it takes some reading and hacking to get it working.
This Snippet is a really clean and easy to use solution for your ajax needs

Also, what you get out-of-the-box by making it a Snippet is the ability to have access control over the remote api using the built in ModX security (as the remote service is just a document in ModX).