Syntax
| alertEngine_init(popupAlertEnabled, functionName) |
Parameters
| BOOL | popupAlertEnabled | Optional. Default value is true. If you don't want the library to control the popup alerts for you, set this parameter to false.
| | STRING | functionName | Optional. Name of a JavaScript function to call when a new alert is received. This function is called with tree arguments: alert title, url, and date of publication. |
Return value
No value is returned.
Description
Initializes the alert engine. Settings are defined in the XML configuration file.
The XML configuration file must be loaded.
To download the XML configuration file in your application, see xmlSettings.js and xml_settings_download
For more information: XML Configuration File Format
If the parameter popupAlertEnabled is set to true or is not specified, the library will automatically popup an alert window when a new alert is received.
For more information: alertEngineEx.js. |
JavaScript Sample Code
// Starts the alert engine and defines a callback function
// The XML configuration file must be loaded.
alertEngine_init(false, "alert_received")
// An alert is received
function alert_received(title, url, pubDate) {
alert(title+" - "+url+" - "+pubDate)
}
|
|