{dialog.object}submit Method


{dialog.Object}.submit([submitType [,additionalData [,optionsObject]]])



Custom submit type. Lets you compare different submit values, if there are multiple buttons on a UX that use submit(). The submit type can be any desired value.


Additional data to be submitted in the form of a URL query string.

optionsObjectJSON object

A JSON Object with additional information. The following options can be specified:


A true/false value. If true, list data is submitted to the server.


Function to call if the device is offline.


Function to call if the callback completes successfully.


A true/false value. If true, form data will be submitted from the component. Set to false if you do not want to submit form data.


A true/false value. Indicates if the location (latitude and longitude) should be fetched from the browser and submitted to the server.

The e object passed to server-side Xbasic events will contain the location in the following properties: __locationFound - true/false, __locationLatitude - the latitude value, and __locationLongitude - the longitude value.

Not all browsers support fetching the location.


A true/false value. Indicates if high accuracy should be used when fetching the location. Using high accuracy will take longer and use more power.


Amount of time to wait in milliseconds to fetch the location.


Maximum time in milliseconds to accept a previously fetched location. A value of 0 means that a new location must be fetched.


Maximum number of milliseconds to wait for a response from the server.


Function to call if an error occurs.


An object with the following properties:


A true/false value. If true, chunked responses will be used.


The maximum number of messages to listen for.


The maximum number of seconds to listen for messages.


Submits the UX to the server.


The submit() method posts data from the UX component to the server via an ajax callback.


You can optionally include a 'submitType'. If you have multiple buttons on the UX that call the .submit() method, by specifying the 'submitType' your code in the dialogValidate and afterDialogValidate event handlers could test the value of the submitType value.


The submit type value is available in Xbasic server-side events for the UX component in the 'Request.Variables.__submitType' variable.

You can also optionally specify additional data to be submitted in the form of a URL query string. For example:

var additionalData = "value1=alpha&value2=beta";

The additional data is available in 'Request.Variables' variable in the Xbasic server-side events for the UX component.

You can also pass additional options to the submit() method. For example:

var options = {getLocationData:true};

The getLocationData option indicates that location information from the browser should be submitted as part of the callback.

See Also