{grid.object}ajaxCallback Method


{grid.Object}.ajaxCallback(part,rowNum,XbasicFunction [,callbackURL [,additionalData [, options]]])



'G', 'S', 'D' - indicates the Grid part (Search, Grid, or Detail View) from which data should be submitted.


Specifies the Grid row from which data should be submitted.


the name of the Xbasic function that will handle the callback.


this parameter is almost always set to a blank string. It can be used to specify the URL you want to call to handle the callback. For example, you could call a .php, or .asp page to handle the callback. If this value is not blank then the setting for XbasicFunction is ignored.


A Javascript string of name/value pairs, separated by '&', of additional data you want to submit to the server. For example 'data1=value1&data2=value2'


An object with one or more additional options. Available options include:


The length of time in milliseconds to wait until the callback times out.


A function that will be called when the operation completes.


Function called if the server does not send a response. A response may not be sent if there is no internet connection or the server cannot be reached.

If the server does not send a response because there was an error when executing the Xbasic function handling the callback, the error function will not be called. To handle Xbasic errors in your callback functions, add error handling logic to capture the Xbasic error and return an error message to the client.


A function that will be called if the device is offline and the callback cannot be performed.


Does an Ajax callback to a server.



Data from the current row is submitted to the server. It is recommended that you use Action Javascript to write the code for you. This can be done by creating an Ajax Callback Action either as a Javascript Action or as Action Javascript for a control's event.

See Also