|
Robert E. Boughner |
Anchor Command
Reference
|
|
1. |
Introduction |
|
This command reference lists the
commands you can use to position coolTips
with respect to various Reference Markers on your web page,
which may be a named image, a positioned DIV container
with a valid ID, or a named Anchor element.
To include
this support plugin just place the following statements
in the HEAD section of your document:
<SCRIPT TYPE="text/javascript" SRC="cCore.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" SRC="cAnchor.js"></SCRIPT>
You only have to make sure that the cAnchor.js module
is loaded after the core module.
Remember that commands are always in uppercase (case-sensitive)
and can have none or more parameter values.
Download this
module as a zip file. |
2. |
Purpose |
|
The Anchor commands allow
one to position a coolTip with respect to
reference markers on your web page. Reference markers are
positioned DIV elements with a valid ID, a named image, or
a named Anchor, which can also be a normal hypertext link
if it has a NAME and/or ID attribute specified too. |
3. |
Anchor
commands |
|
- ANCHOR example
- The
parameter for this command is a string which is a
valid ID or name of a positioned DIV, image, or Anchor
on the web page. If the value specified by ANCHOR can't
be found, a warning message informing you of
this will be given. However, you can change that behavior
by using NOANCHORWARN on
the command line which will disable this warning notice
and the coolTip behaves as a normal popup, appearing near
the triggering link. By using this parameter in conjunction
with the ctPageDefaults() routine, you can effectively
toggle this behavior on and off. Default value is the null
string ('').
Variable: cd_anchor
- NOANCHORWARN example toggle
action
- Will turn off the warning message that is given if a
valid ANCHOR can't be found on the page.
Default value is true (1). When used on the coolTip command
line, it will switch the current state of this parameter
to its opposite state.
Variable: cd_noanchorwarn
- ANCHORALIGN anchor point
- Defines how a coolTip should be positioned with respect
to a reference mark. Command parameter values can be either
strings or numbers (the above
link with a value of 0.5, which aligns the mid-points
of both objects on top of one another). See further discussion
below about numeric values. Allowable string values
are Upper Left (UL), Upper Right (UR), Lower Left (LL),
and Lower Right (LR). (Will accept lower case values too.)
The value of this property determines the point on the
reference mark where the popup is positioned and its location
relative to that reference point. In other words, if ANCHORALIGN is
'LR' then the lower right corner of the popup will be positioned
on the lower right corner of the reference object. You
can also specify values for ANCHORX/ANCHORY,
which will move the popup from its anchor point by these
specified x,y offsets. Default value is 'UL'. Slight visual discrepancies in aligning the popup relative to the marker object are most likely associated with borders on the popup.
If you want to specify a different corner for the coolTip then
supply a second value to this commad. The first value specifies the reference
point on the reference object and the second value specifies the corner of
the popup that will be positioned there. The default behavior of this command
is is the same as specifying ANCHORALIGN, 'UL','UL'. Other values can be supplied but the coolTip
display may not be as expected, especially if the name link is split accross
two or more lines. Consistent behavior will be obtained if the first value
is specified as 'UL'. Parameter
values to this command can also be numeric, varying from one to four numerical
values. If two numerical values are specified, the first one applies to the
marker object and the second one applies to the popup object. These values
are the multiplicative factors for both the width and height of the respective
objects. In other words, specifying a value of 0,1, then the anchor point
is the upper left hand corner of the reference marker (the factor 0) and
the lower right hand corner of the popup object (the factor 1). If only a
single numerical value is given, then the same factor is applied to the width
and height of both objects. By specifying four numerical
values, the user has more precise control of the anchor point. The first two
values refer to the x/y displacement from the upper left hand corner on the
reference object (which is the 0,0 point) and multiply the respective width
and height of that object. The second pair of numbers refer to the x/y displacement
from the upper left hand corner on the coolTip and multiply
its respective width and height values. Positive displacements are to the right
and downward. String values and numerical values can be mixed but the user
must explicitly give the x/y displacements for the non-string anchor
point. In otherwords, the command can be given either as ..., ANCHORALIGN,
'UR', 0.5,0.5, ... or ..., ANCHORALIGN, 0.5, 0.5, 'UR', ...
Variable: cd_anchoralign
- ANCHORX x-offset
- A
number, in pixels, which specifies the x displacement of
the popup from its reference object. Default value is 0.
Positive values move the popup toward the right.
Variable: cd_anchorx
- ANCHORY y-offset
- A number, in pixels, which specifies the y displacement
of the popup from its reference object. Default value is
0. Positive values move the popup downward.
Variable: cd_anchory
|
|
|
NOTE. Items shown in a washed out color are no longer supported. |
|