decorative banner

Test Variable


    Test Variable is an extension to the Idle action that allows you to read the current value of a variable at runtime and compare it with a value you specify. This comparison evaluates either as true or false, and the result can be used to trigger two alternative actions.

    Trigger the action with a browser-triggered event set to OnLoad in the head section of the page. In the Head Action Inspector, choose Action > Special > Idle. In the Condition tab of the Action Inspector, choose Action > Variables > Test Variable. Choose the variable whose value you want to compare from the Variable menu. The Value item changes automatically with the type of the variable. Use the appropriate control to supply a value you want to test the variable against, as explained in the section on variable initialization. (See Init Variable.) Choose the type of comparison from the Operation menu.

    Note: Not all comparison operators work with all types of variables. For example, using "Greater than" with a string variable will result in a JavaScript error in the browser because the browser expects a number.