jQuery rpc

程序名称:jQuery rpc

授权协议: 未知

操作系统: 未知

开发语言:

jQuery rpc 介绍

The is rpc(remote procedure call) client implementation based on JQuery. It
creates an rpc object and adds ability to call them. It supports both xml and
json rpc. The datatype support listing is coming soon. It is in early stage.
It will not be upgraded if you do not provide Feedback . Please take a look at
the code and let me kNow what you think :) .

Synopsis

$.rpc(url, dataType, onLoadCallback, version)

parameters:

url - The url of the rpc server.
dataType - It can be json or xml depending on the rpc server
(optional, default:json).
onLoadCallback - It is the method called when the rpc object is loaded
from server response (optional).
version - The rpc server version (optional).

returns: - The rpc object parsed from the rpc server.

How to use:

After calling the $.rpc(your_server) you can get all the objects and
methods in that server.

var server = $.rpc(your_server_url, "xml");

It may take some time to load the server data. You can assign a load
callback to add task when
the server is loaded. Finally you can call the server functions like this,

// call system.getCapabilities like this server.system.getCapabilities(function(data){console.log(data)}); // or server.yourObject.com.your.object.yourMethod(yourParams, callback);

Note that this procedure is asynchronous. And callback functions are
called when a task is done ..

And here is the demo code,

`


demo










`

The above code will connect to the provided rpc server and list the
methods in system object ..

Please let me kNow if the above document is helpful. And let me kNow
if you have any suggestion.

jQuery rpc 官网

http://plugins.jquery.com/project/rpc

相关编程语言

多功能下拉选择插件 SelectPage 简洁而强大的下拉分...
AutoComplete 是一个 jQuery Mobile 的插件,用于实...
Combogrid 是一个jQuery插件用于为输入框添加高级自...
Autobox2这个jQuery插件,可以用于创建类似于Facebo...
Link Scraper TextBox 是一个文本框的扩展插件,当你...
Awesomplete 超小超好用的超漂亮的 autocomplete 框...