The Run Javascript script event processor allows you to configure a Javascript script that will be executed whenever the selected event takes place. This event processor allows access to available event data at the time the event occurs, so the script can evaluate and execute functions depending on their current values.
You can structure the expressions that the Run Javascript script event processor should evaluate and run, using common Javascript syntax. As with other WinGate scripting systems, you can select available event data from the Symbol Browser to include in the script. These will provide the latest data values at the time the event occurs.
By default, an empty function called filter is provided in the Javascript item properties. The parameters of the filter function inside the parentheses will vary in appearance, depending on the event that the Javascript will process. Do not modify any of the filter function definition, as this will prevent the function from working correctly. Simply enter all Javascript inside the body area of the filter function, that you wished to have processed whenever the script is run.
In between the curly brackets, enter the Javascript expressions that you wish the Run Javascript script event processor to evaluate and process.
All code placed inside the curly brackets should conform to Javascript syntax rules. (e.g. variables declared correctly, using curly brackets when setting functions, semi colons for statements etc.).
You can insert WinGate objects and available event data into the Javascript expressions by placing the cursor at the desired location in the statement and clicking the Insert symbol button to open the Symbol Browser.
In this example we will select the Request.Port method from the Symbol Browser.
This value will be checked by an Javascript if statement to see if it equals 369. If it does then the Javascript will process the Notifications.Report method from the Symbol Browser, to report an incident to the WinGate Notifications system.
If there is more then one event processor configured to respond to the event, then you can use the arrows to define the order that the event processors will be actioned whenever the event takes place. When there is more then one event processor configured, the order of processing is also displayed in the Event processing pane on the Events panel.
©2012 Qbik New Zealand Limited
no comments yet...
You can use basic Full-Text Searches against the page title and body to find matching articles. Use the following search modifiers to refine your query:
You can create a new account or reset your password at forum.wingate.com.