ajaxCallMethod

Shortcut function to make callback to an AjaxMethodCallback control on a WebForm or a CallbackHandler on the server and returns a JSON result object.

Use this method if you are not using the AjaxMethodCallback control. This approach doesn't require a proxy - rather you specify the method name as a string and parameters explicitly in an array.

ajaxCallMethod(url,
     method,
     parms,
     callback,
     errorCallback,
     options)

Parameters

url
The URL to access including any query string data.

method
Name of the method to call on the server

[parms]
An array of parameters to be sent to the server side method. Parameters should be passed in the type expected by the server. Object parameters need to only partially match values.

callback
Optional function that is called on a successful callback. Function receives the result value of the method call as a typed value.

errorCallback
Optional function that is called when an error occurs. Receives a CallbackException object as a parameter that holds exception information. You can check the Message (message in FoxPro) property for the error message.

options
Optional object map that provides options for the AjaxMethodCallback object. You can specify any of its property values as option parameters. Specifically check out the postbackMode option which allows specifying what data is posted including form data.


See also:

ajaxJson

© West Wind Technologies, 1996-2024 • Updated: 08/18/17
Comment or report problem with topic