The purpose of this module is to allow the user to obtain information about
internal variables of the overlibmws core and/or
plugin modules while the core and/or pluging modules are actually working in order
to assist in debugging situations for which popups are not behaving as expected.
To use this plugin module, import it after the core module:
Initial (default) Debug Layer
To query variables within the core or a plugin module, just insert the following
statement at the appropriate place within the core or plugin code:
where variable_label is what you want to call the variable that
is going to be dislayed and variable is that actual variable to
For example, if you want to see what the values of OLx and OLy
(overlib's run-time variables for the cursor coordinates) are while moving the
mouse around your page, insert the statement:
OLshowProperties('OLx', OLx, 'OLy', OLy)
after the point where these variables are set in the OLmouseMove function,
as you can see by clicking here.
the core module used on this page, overlibmws_vdbg.js, has calls to
the OLshowProperties() function but is otherwise the same as
overlibmws.js. Flags set via the onClick event are being used to
regulate initiation of OLshowPropteries() handling simply for purposes of this
When the OLshowProperties() function is called with only the
variable_label, variable pairs as arguments, a
default positioned div container (layer) with id="showProp" is used.
The layer will be generated dynamically and need not be declared in the document,
but do not use showProp as the id value for another element.
Multiple Debug Layers
You can place the OLshowProperties() function in more than one location in the
core and/or plugin modules, and correspondingly have more than one debug layer
(positioned div container) showing at a time.
To do so, each additional layer must have a unique id, and the id
(a string value) must be used as the first argument in the call to OLshowProperties(),
You can see a demonstration of multiple debug layers by clicking here.
To allow the user to see all of the popups (which are offset from one another
horizontally), the layer id is used as a link at upper left, which when
clicked will move that layer to the bottom of the stack and move the others
upward. The additional layers also will be created dynamically and need
not be declared explicitly in the document.
Hiding and Restoring Debug Layers
You can set a debug layer's visibility to hidden by clicking on the close
button labeled X in the upper right-hand corner.
Once a debug layer has been cast to hidden, it will remain hidden unless it
is cast to visible again via the ALLOWDEBUG command (see below) or its
configuration variable. For this demonstration, ALLOWDEBUG has been made the
page default with the showProps id and the ids for the two additional
debug layers (OLplaceLayer and OLrepositionTo) used as its
parameter via the OLpageDefaults() configuration function:
so that once each layer is invoked, if hidden via its close button it will
become visible again whenever an overlib popup is invoked (and can be made
hidden again via its close button).
Specifies a string value with the id of a debug layer or a comma-separated
list of debug layer ids (default is the null string, "").
When the string value is non-null and points to valid id(s), the corresponding
debug layer(s) that was(were) made hidden via the debug layer close button at
upper right can be made visible again whenever an overlib call which can invoke
the debug layer(s) is made again.
Such layers can be made hidden again via their close button.
The string value can be set on the command line, via the configuration
variable, or via the OLpageDefaults() configuration function.