Detailed Usage Instructions for Functions in
"clc_highlight.js"
List of Functions
Detailed Usage Instructions
void CLC_ConfigHighlight(String_BgColor, String_FontColor,
String_FontWeight, String_FontSize)
Input parameters:
- String_BgColor - String that specifies the background
color for the object that is highlighted. If you do not
wish the background color to change when the object is
highlighted, set this value to a null string ("").
Otherwise, this string must be something that would be
appropriate for use in a JavaScript style setting for the
backgroundColor property.
- String_FontColor - String that specifies the font color
for the object that is highlighted. If you do not wish the
font color to change when the object is highlighted, set
this value to a null string (""). Otherwise, this string
must be something that would be appropriate for use in a
JavaScript style setting for the color property.
- String_FontWeight - String that specifies the font
weight for the object that is highlighted. If you do not
wish the font weight to change when the object is
highlighted, set this value to a null string ("").
Otherwise, this string must be something that would be
appropriate for use in a JavaScript style setting for the
fontWeight property.
- String_FontSize - String that specifies the font size
for the object that is highlighted. If you do not wish the
font size to change when the object is highlighted, set
this value to a null string (""). Otherwise, this string
must be something that would be appropriate for use in a
JavaScript style setting for the fontSize property.
Return parameter:
- void - This function has no return value.
Error messages:
Additional notes:
- If this function is not called, the default
highlighting style will be used.
-
The default highlighting style settings are:
- String_BgColor = "black"
- String_FontColor = "yellow"
- String_FontWeight = "bold"
- String_FontSize = ""
- Use the String_FontSize setting with care. It can cause
a signficant amount of distortion when highlighted, and it
can also make some objects smaller. For example, you may
accidentally cause headings to shrink when you highlight
them.
void CLC_Highlight(DOM-Obj_Target)
Input parameters:
- DOM-Obj_Target - DOM-Obj that is to be highlighted
Return parameter:
- void - This function has no return value.
Error messages:
- Cannot highlight specified target because it cannot
have style defined. - This means that the DOM-Obj_Target
does not have a style attribute. Check the DOM-Obj_Target
to make sure that it is a valid DOM-Obj and that it does
have the style attribute. You can see if it has a style
attribute or not by using the DOM Inspector in
Firefox.
Additional notes:
- Text Nodes (nodeType = 3) in Firefox do NOT have the
style attribute. You cannot highlight a Text Node directly;
instead, you must highlight its parent node. Alternatively,
you could encapsulate the Text Node with a dummy HTML
element and then highlight the dummy element.
void CLC_Unhighlight()
Input parameters:
Return parameter:
- void - This function has no return value.
Error messages:
Additional notes:
- This function unhighlights the last highlighted object.
If you have multiple objects highlighted, only the last
highlighted object will be unhighlighted.
- If you wish to have a moving highlight, make sure that
you always call CLC_Unhighlight before you CLC_Highlight
another object since you can only unhighlight one
object.