{dialog.object}_updateAjaxURL Method
Syntax
{dialog.object}._updateAjaxURL(url);
Arguments
- urlstring
The new Ajax Callback URL. Must be a fully qualified URL. The URL is the location where the UX component has been published. For example, "https://www.myserver.com/v2".
Returns
- newAjaxURLstring
Returns the full Ajax URL for the component.
Description
Updates the Ajax Callback URL for a Cordova application.
Discussion
When you build a Cordova application, the URL for AJAX callbacks is set at the time that you build the application.
You can change this URL at runtime using the {dialog.object}._updateAjaxURL() method. The _updateAjaxURL() method handles updating the {dialog.object}.ajaxURL property. For example:
var newCallbackURL = 'https://www.myserver.com/v2'; var fullURL = {dialog.object}._updateAjaxURL(newCallbackURL); alert("New url is: " + fullURL);
This method is preferred to setting the {dialog.object}.ajaxURL property directly because it does not require that you also specify the published component's filename in the URL.
Limitations
Cordova Applications Only