[ Back to the index ]

Global variables & extra functions

  1. Global variables
  2. Extra functions

Global variables

The jscAutoComplete uses a few global variables for storing data used every time the jscAutoComplete control is called on a page:
  1. ac_LIST_LENGTH

    The number of items currently shown in the jscAutoComplete control. Used by the jscAutoComplete control for internal navigation.

  2. ac_LIST_MAX

    The maximum number of suggestions to show in the jscAutoComplete list. This can be set as '0' (nought) to show all matches without any limits.

  3. ac_TIMER

    A timer variable (window timeout) for hiding the control if it loses focus. This timer is cleared by the control if another part of it (ie; the suggested word list) receives focus.

  4. ac_VISIBLE

    This flag is set by the jscAutoComplete control to state whether or not the control is visible, to prevent the visible state of the control being updated needlessly.

  5. ac_DRAWN

    This flag is simply set by the jscAutoComplete control after the HTML for the auto complete list container has been drawn to prevent the control needing to redraw the container every time. You should not change the value of this variable yourself.


Extra functions

jscAutoComplete includes the following extra functions to facilitate some of the methods the jscAutoComplete control uses, or to reduce code or make code more readable. These functions are not intended for use by the User, but are called automatically from within the script.
  1. GetOBJ

    Takes a single arguament which is the id of an object on the page, and returns either a pointer to the object or null otherwise.

  2. GetPOS

    Takes a single arguament which is an object of a visible page element. The returned value is an array of absolute positions and dimensions for the object.