post
|
Makes a callback with the data to the server.
post(pageURL, serverMethod, clientFunction, params, throwErrors, throwExceptions)
-
pageURL - URL of server file where data will be sent and processed.
Optional. If it's null, the data will be sent to the same page.
-
serverMethod - Name of the server-side method to process data.
The server-side method needs to be declared public.
-
clientFunction - The client-side function called when the asynchronous callback is done.
Optional.
-
params - Specify the parameters for the server function in the same call as ob_post.post instead of using ob_post.AddParam.
This:
ob_post.AddParam ("param1", value);
ob_post.AddParam("param2", value);
ob_post.Post(null, "myServerMethod", myFunction);
and this:
ob_post.Post(null, "myServerMethod", myFunction, {"param1":value, "param2":value});
are equivallent.
In case of a synchronous callback with specifying parameters, the myFunctiion parameter can be null.
Optional.
-
throwErrors - Override existing setting of ShowErrorsAtClient property, but only for this callback operation.
Optional. If not used, default setting is used.
-
throwExceptions - Override existing setting of ThrowExceptionsAtClient property, but only for this callback operation.
Optional. If not used, default setting is used.
ob_post.post(null, "myServerMethod", myFunction);
ob_post.post("ProcessPage.aspx", "myServerMethod", myFunction);
ob_post.post("http://www.site.com/ProcessPage.aspx", "myServerMethod", myFunction);
ob_post.post(null, "myServerMethod", myFunction, {"param1":paramValue1, "param2":paramValue2});
|