`<ajax:event />`
AJAX events define an interaction sequence between a client and the server.
Typically, javascript will trigger the AJAX event which executes code and updates a region on the page.
For example, ticking a box might send data to the server, and depending on it's value, show or hide additional content on the page.
Any javascript event on an Oncord control can trigger an ajax event.
Just specify the native event name, suffixed by ajax.
For instance: onclickajax="..." and onchangeajax="...".
Attributes
- `id`
string
Give this control a unique id. Can be accessed in the client DOM (eg, document.getElementById('myid') or in the server DOM using [? $myid ?] or [? $('myid') ?]).
- `onSuccess`
string
JavaScript to be executed when ajax event completes successfully
- `onSuccessCloseDialog`
int
Closes the dialog box on the client
- `onSuccessToastMessage`
string
The toast message to be displayed upon successful server command
- `onTrigger`
string
JavaScript to be executed when ajax event is triggered
- `showLoading`
bool
Whether to show a loading message. Default = true.
- `showLoadingMessage`
string
The text to display inside the loading message
- `updateRegions`
string|array
Sets which ajax:region controls to refresh