Introduction
This command reference lists the commands you can use to control overLIB. There are multiple ways to customize overLIB and using commands all the time is NOT the correct way of doing this. Read the Documentation and Customizing overLIB for more information about other ways to customize overLIB.Remember that commands are always in uppercase (case-sensitive) and can have none or many parameters.
Plugins
The commands listed here are the commands available in overLIB's core, without using any Plugins. There are many other commands available through Official Plugins (distributed with overLIB) and Unofficial Plugins (may be downloaded separately).Behaviour, Positioning and Sizes
STICKY Makes the popup stick around until closed. Default is not to be STICKY (0). This is a number, either 1 or 0.Variable: ol_sticky.
overlib('This is a STICKY popup', STICKY, CAPTION, 'STICKY example')
WIDTH pixels Sets the width of the box to some other size. This is a number whose default value is 200.
Variable: ol_width.
overlib('This changes the width to 300 pixels', WIDTH, 300)
HEIGHT pixels
Sets the height of the box. This is a number whose default value is -1. Variable: ol_height.
overlib('This will change the height to 100 pixels', HEIGHT, 100)
LEFT
Makes the popups go to the left of the mouse. Variable: ol_hpos.
overlib('Aligns popup on left', LEFT)
RIGHT
Makes the popups go to the right of the mouse. This is the default position.
Variable: ol_hpos.
overlib('Aligns popup on the right', RIGHT)
CENTER
Makes the popups to be centered about the mouse. Variable: ol_hpos.
overlib('This will center the popup on the cursor', CENTER)
ABOVE
Makes the popups go above the mouse. Note: Only possible when HEIGHT has been set. Variable: ol_vpos.
overlib('This places the popup above the cursor', ABOVE)
BELOW
Makes the popups go below the mouse. This is the default position.
Variable: ol_vpos.
overlib('This places the popup below the cursor', BELOW)
OFFSETX x
How far away from the pointer the popup will show up, horizontally. This is a number whose default value is 10 pixels. NOTE: Positive values move the popup towards the right edge of the window and negative values move it toward the left edge of the window.
Variable: ol_offsetx.
overlib('This changes the x-offset to 0', OFFSETX, 0)
OFFSETY y
How far away from the pointer the popup will show up, vertically. This is a number whose default value is 10 pixels. NOTE: Positive values move the popup downward toward the bottom of the browser's window and negative values move it upward.
Variable: ol_offsety.
overlib('This changes the y-offset to 0', OFFSETY, 0)
AUTOSTATUS
Sets the status bar's text to the popup's text. Overrides STATUS. A number whose default value is 1.
Variable: ol_autostatus.
overlib('This will appear on the STATUS BAR', AUTOSTATUS)
AUTOSTATUSCAP
Sets the status bar's text to the popup's caption. Overrides AUTOSTATUS and STATUS. A number whose default value is 2.
Variable: ol_autostatus.
overlib('The caption will appear in the STATUS BAR', CAPTION, 'Hi. There!!',
AUTOSTATUSCAP)
SNAPX grid
Snaps the popup to an even position in a horizontal grid. A number whose default value is 0.
Variable: ol_snapx.
overlib('This popup will snap to a 20 pixel, horizontal grid', SNAPX, 20)
SNAPY grid
Snaps the popup to an even position in a vertical grid. A number whose default value is 0.
Variable: ol_snapy.
overlib('This popup will snap to a 20 pixel, vertical grid', SNAPY, 20)
FIXX position
Locks the popup's horizontal position relative to the HTML page's upperleft hand corner. This may cause the popup to become invisible if the page is scrolled. Overrides all other horizontal placements, except RELX which takes precedence. A number whose default value is -1.
Variable: ol_fixx.
overlib('This places the popup at 10 pixels from the page's left edge', FIXX, 10)
FIXY position
Locks the popups vertical position relative to the HTML page's upperleft hand corner. This may cause the popup to become invisible if the page is scrolled. Overrides all other vertical placements, except RELY which takes precedence. A number whose default value is -1.
Variable: ol_fixy.
overlib('This places the popup at 10 pixels from the page's top edge', FIXY, 10)
RELX x-position Positions popup a number of pixels, relative to the upper left hand corner of the browser window, in the horizontal direction. Overrides all other horizontal placements, including FIXX. Negative values will position the popup from the browser window's right hand edge. A number whose default value is not set (NULL).
Variable: ol_relx.
overlib('This places the popup 10 pixels to the left of the browser window's right edge',
RELX, -10)
RELY y-position Positions popup a number of pixels, relative to the upper left hand corner of the browser window, in the vertical direction. Overrides all other vertical placements, including FIXY. Negative values will position the popup from the bottom edge of the browser window. A number whose default value is not set (NULL).
Variable: ol_rely.
overlib('This places the popup 10 pixels above the browser window's bottom edge',
RELY, -10)
FRAME frame
Controls popups in a different frame. Make sure you have the overDiv declaration in the target frame as well. The frame parameter passed to this command should not be a text string. This should be a window object whose default value is self, i.e., the current window or frame. This feature is now considered fully functional. This command is available only if the Plugin - Crossframe plugin is also included.
Variable: ol_frame.
overlib('Text', FRAME, parent.below) // assuming you have a frame called below.
TIMEOUT millisecs
Makes the popup go away after the requested delay after first being shown. A number whose default value is 0. A delay on closing is similar (e.g., onMouseOut="return nd(500)"), but it becomes actived when your cursor leaves the triggering link. It is probably not a good idea to include both on the same popup.
Variable: ol_timeout.
overlib('This popup will close in about a 1/2 second', TIMEOUT, 500)
DELAY millisecs
Makes that popup behave like a tooltip. It will popup only after a certain delay specified in millisecs. A number whose default value is 0. If DELAY has been scheduled for a popup, then any delay on closing will be cancelled.
Variable: ol_delay.
overlib('This popup will open in about a 1/4 second', DELAY, 250)
HAUTO
Automatically determine if the popup should be to the left or right of the mouse. This command switches the default value of this command to its opposite state for this invocation only. A number whose default value is off (0).
Variable: ol_hauto.
overlib('This popup will be positioned automatically in the horizontal', HAUTO)
VAUTO
Automatically determine if the popup should be to the above or below of the mouse. This command switches the default value of this command to its opposite state for this invocation only. A number whose default value is off (0).
Variable: ol_vauto.
overlib('This popup will be positioned automatically in the vertical', VAUTO)
CLOSECLICK
Force users to click on "Close" to close sticky popups. This command switches the default value of this command to its opposite state for this invocation only. A number whose default value is off(0).
Variable: ol_closeclick.
overlib('This popup will close by clicking the close link', STICKY, CAPTION, 'A STICKY',
CLOSECLICK)
Colors, Fonts and Images
FGCOLOR colorColor of the inside of the popup box. A string value whose default is "#CCCCFF". NOTE: If a hexadecimal triplet is specified for the color, then the leading hash (#) mark must also be included according to the HTML 4.01 Specification.
Variable: ol_fgcolor.
overlib('This changes the popup's main text color to a light yellow', FGCOLOR, '#FFFFCC')
BGCOLOR color
Color of the border of the popup box. A string value whose default is "#333399". See NOTE for FGCOLOR.
Variable: ol_bgcolor.
overlib('This changes the border and caption area color to green', BGCOLOR, '#006600')
TEXTCOLOR color
Sets the color of the text inside the box. A string value whose is black ("#000000"). See NOTE for FGCOLOR.
Variable: ol_textcolor.
overlib('This changes the main body text to blue', TEXTCOLOR, '#0000FF')
CAPCOLOR color
Sets the color of the box's caption. A string value whose default is white ("#FFFFFF). See NOTE for FGCOLOR.
Variable: ol_capcolor.
overlib('This changes the caption text to yellow', CAPCOLOR, '#FFFF99')
CLOSECOLOR color
Sets the color of the close text. A string value whose default is "#9999FF". See NOTE for FGCOLOR.
Variable: ol_closecolor.
overlib('This changes the Close color to white', CLOSECOLOR, 'white')
TEXTFONT font
Sets the font to be used by the main text. A string value whose default is "Verdana,Arial,Helvetica". NOTE: Multi-word font-family names must be quoted.
Variable: ol_textfont.
overlib('This sets the text font-family to Times Roman', TEXTFONT, 'Times Roman')
CAPTIONFONT font
Sets the font of the caption. A string value whose default is "Verdana,Arial,Helvetica". See NOTE for TEXTFONT.
Variable: ol_captionfont.
overlib('This sets the caption font-family to Times Roman', CAPTIONFONT, 'Times Roman')
CLOSEFONT font
Defines the font for the "Close" text. A string whose default is "Verdana,Arial,Helvetica". See NOTE for TEXTFONT.
Variable: ol_closefont.
overlib('This changes the close font-family to Times Roman', CLOSEFONT, 'Times Roman')
TEXTSIZE size
Size of the main text's font. It is a string value containing either an integer, as '1', or a number with a length specifier, like '10px'. Default value is '1'.
Variable: ol_textsize.
overlib('This changes the main body text size to 10 pixels', TEXTSIZE, '10px')
CAPTIONSIZE size
Size of the caption's font. It is a string value containing either an integer, as '1', or a number with a length specifier, like '10px'. Default value is '1'.
Variable: ol_captionsize.
overlib('This changes the caption text size to 0.5 ems', CAPTIONSIZE, '0.5ems')
CLOSESIZE size
Size of the "Close" text's font. It is a string value containing either an integer, as '1', or a number with a length specifier, like '10px'. Default value is '1'.
Variable: ol_closesize.
overlib('This changes the close text size to 9 pixels', CLOSESIZE, '9px')
FGBACKGROUND picture
Defines a picture to use instead of color for the inside of the popup. You will most likely want to set FGCOLOR to nothing or the color will show as well. A string value whose default is the null string (" "). Can also include the absolute or relative path to the image.
Variable: ol_fgbackground.
overlib('This will use myImg.gif for the main body text background',FGBACKGROUND,
'myImg.gif', FGCOLOR,'')
BGBACKGROUND picture
Defines a picture to use instead of color for the border of the popup. You will most likely want to set BGCOLOR to nothing or the color will show as well. When having a Close link, Netscape will re-render the table cells, making things look bad. A string value whose default is the null string (" "). Can also include the absolute or relative path to the image.
Variable: ol_bgbackground.
overlib('This will use myImg.gif for the caption area background', BGBACKGROUND,
'myImg.gif', BGCOLOR,'')
CAPICON url
Displays a small icon before the popup caption. A string value whose default is the null string (" ").
Variable: ol_capicon.
overlib('This popup includes an icon in the caption', STICKY,
CAPICON,'images/handgrab.gif', CAPTION, 'CAPICON Example')
BORDER pixels
Makes the border of the popups thicker or thinner. A number whose default is 1.
Variable: ol_border.
overlib('This sets the popup's border to 5 pixels', BORDER, 5)
BACKGROUND picture
Instead of using the table box as background, your picture will be used. A string value whose default is the null string (" ").
Variable: ol_background.
overlib('Uses myPicture.jpg as the background', BACKGROUND, 'myPicture.jpg', FGCOLOR, '')
PADX left right
Pads the background picture with horizontal whitespace for text placement. Note that this is a two parameter command. Both parameters are numbers with default values of 1. Normally used with the FULLHTML command.
Variable: ol_padxl and ol_padxr.
overlib(<i>myTextHere</i>, PADX, 20, 20, ...)
PADY top bottom
Pads the background picture with vertical whitespace for text placement. Note that this is a two parameter command. Both parameters are numbers with default values of 1. Normally used with the FULLHTML command.
Variable: ol_padyt and ol_padyb.
overlib(<i>myTextHere</i>, PADY, 20, 50, ...)
FULLHTML
Allows you to control the html over a BACKGROUND picture completely. The html code is expected in "text". A number whose default is off (0).
Variable: ol_fullhtml.
overlib(<i>myTextHere</i>, FULLHTML, ...) // where <i>myTextHere</i> the HTML markup for your popup
Cascading Style Sheets
CSSOFFTurns off CSS features and resorts to standard html tags. This is the default value for popup styling. See comments under CSSCLASS below.
Variable: ol_css.
CSSSTYLE
Turns on inline CSS style features. Must be used if any of the inline style commands are used. Variable: ol_css.
overlib('This popup uses CSSSTYLE commands', CSSSTYLE, STICKY, TEXTSIZE, 12, CAPTION,
CLOSEDECORATION, 'line-through', CLOSESIZE, 9, CLOSECOLOR, '#ffffff', CLOSECLICK)
// Note that the default settings for font sizes must be reset or they will be too small
// to read. Sizes here will refer to pixels since the default size unit is 'px'. If all
// popups on a page employ this same formatting, then use of overlib_pagedefaults would
// shorten the command line considerably.
CSSCLASS
Turns on CSS class features. This command is no longer required, but is kept for backward compatibility. If any class commands associated with CSSCLASS are used, they will over-ride the default formatting. Any formatting not over-riden by a class command will retain their default settings. Variable: ol_css.
Class commands
FGCLASS classClass for the inside table of the popup box. A string whose default is the null string (" "). The parameter to this command is comparable to the FGCOLOR command.
Variable: ol_fgclass.
BGCLASS class
Class for the outside table of the popup box. A string whose default is the null string (" "). The parameter to this command is comparable to the BGCOLOR command.
Variable: ol_bgclass.
TEXTFONTCLASS class
Class for the main text area. A string whose default is the null string (" "). The parameter to this command is the name of a custom class that can specify the font-family, size, and positioning of the main body text, in accordance with CSS rules.
Variable: ol_textfontclass.
CAPTIONFONTCLASS class
Class for the caption text. A string whose default is the null string (" "). The parameter to this command is the name of a custom class that can specify the font-family, size, and positioning of the caption text, in accordance with CSS rules. It may also specify background color.
Variable: ol_captionfontclass.
CLOSEFONTCLASS class
Class for the close text. A string whose default is the null string (" "). The parameter to this command is the name of a custom class that can specify the font-family, size, and positioning of the caption text, in accordance with CSS rules. It may also specify background color.
Variable: ol_closefontclass.
If the following is defined in your head section:
<STYLE TYPE="text/css">
<!--
.fontClass {font-family: 'Comic Sans MS'; font-size: 12px;}
.capfontClass {font-family: Arial, sans-serif; font-size: 14px; font-weight: bold;
color: #ffffff;}
.capfontClass A {color: #ffffff; font-size: 9px;}
.fgClass {background-color: #FFFFCC;}
.bgClass {background-color: #333399;}
-->
</STYLE>
an example call would be
overlib(INARRAY, 0, WIDTH, 400, CSSCLASS,TEXTFONTCLASS,'fontClass',FGCLASS,'fgClass',
BGCLASS,'bgClass',STICKY,CAPTIONFONTCLASS,'capfontClass', CLOSEFONTCLASS, 'capfontClass',
CAPTION,'<I>CSSCLASS</I> Example #1')
Style commands
See Plugin - Cssstyle for a description of the associated commands. See CSSSTYLE for an example of a call using these commands.Miscellaneous
Info Object This object contains the core level version number, whether this is a pre-release version, the major and minor numbers of the release, the revision number of the release, and the function meets(requiredCoreVersion), which returns true if this release's version number is equal to or greater than requiredCoreVersion, othewise it returns false (and when there is no parameter specified). This information is contained in the global variable Info.CAPTION title
Sets the caption of the popup. A string whose default is the null string (" ").
Variable: ol_cap.
overlib('Main body text', CAPTION, 'CAPTION text')
CELLPAD one to four padding values
Padding, in pixels, for the main body text in a popup. A number whose default value is 2. There can be from one to four additional values following this command, separated by commas. If there is more than one value, then their interpretation will follow the rules of CSS. If four values are specified then they must specify padding in the order TOP, RIGHT, BOTTOM, LEFT, which is the conventional clockwise order of CSS. If three values are specified, then the first one refers to the TOP padding, the second value is the RIGHT and LEFT padding amounts, and the last value of the three is the BOTTOM padding. When two values are specified, the first value is the TOP and BOTTOM padding, while the second value is the LEFT and RIGHT padding. With a single value, the padding is applied equally on all sides. This feature isn't available in Netscape 4.x. If there is more than one padding value, only the first one will be applied in Netscape 4.x.
Variable: ol_cellpad.
overlib('This popup has variable cellpadding', CELLPAD, 10, 5)
CLOSETEXT text
Replaces the text "Close" with something else. A string whose default is "Close".
Variable: ol_close.
overlib('This popup uses EXIT for the closing string', STICKY, CAPTION, 'Caption string',
CLOSETEXT, 'Exit')
CLOSETITLE title attribute
Sets the text string of the TITLE attribute on the close event if CLOSECLICK is 1. A string whose default value is "Click to Close". If you don't want any TITLE to show, then set this variable to an empty string.
Variable: ol_closetitle.
overlib('This popup uses "Close by clicking" as the closing title', STICKY,
CAPTION, 'Caption string', CLOSETITLE, 'Close by clicking')
COMPATMODE treats custom classes like v3.51
Render custom classes in a manner similar to that implemented in v3.51 of overlib. In addition, the behavior of nd() is similar to that in v3.51; in other words, the popup is closed immediately when the user moves off of the triggering link, regardless of any value assigned to TIMEOUT. Default value is off (0). When used in the command line it will switch the associated variable to its opposite state.
Variable: ol_compatmode
overlib('Some appropriate text here', COMPATMODE)
DONOTHING an empty command
As the name implies, this command does absolutely nothing at all. It was introduced because it was requested by an experienced user of overlib in order to make programming shell wrapper functions easier. There is no associated variable associated with this command.
overlib('This popup uses the DONOTHING command', DONOTHING, DONOTHING, DONOTHING)
FOLLOWMOUSE follow mouse movements
Sets whether the popup should follow the cursor. A number whose default is on (or true) (1). When used on the command line, it acts as a toggle switch to change the current state of the associated default variable to the opposite state.
Variable: ol_followmouse.
overlib('This popup will not follow cursor movements', FOLLOWMOUSE)
MOUSEOFF mouseoff
Will apply the same event handlers that are applied when using the NOCLOSE parameter to a sticky popup that may also have "Close" text. A number whose default value is off (0). When used on the command line, it acts as a toggle switch to change the current state of the associated default variable to its opposite state. This feature is disabled if the overLIB popup and source code are in different frames or windows. This command can also be applied to STICKY popups that don't have a CAPTION.
If this command is followed by a non-zero number, it indicates an additional delay, of the specified number of milli-seconds, to apply before the close action is performed.
Variable: ol_mouseoff.
overlib('This popup can be closed by mousing on, then off of it', STICKY, CAPTION,
'Caption string', MOUSEOFF)
NOCLOSE
Doesn't display the text "Close" on stickies with caption, and will set event handlers so that the popup can be closed by mousing over it and then off of it. This will also cancel any TIMEOUT that has been scheduled for the popup. A number whose default is off (0).
Variable: ol_close.
overlib('This popup will not have close link', STICKY, CAPTION, 'Caption string',
NOCLOSE)
INARRAY id
Tells overLIB to read the text from the ol_texts array, located in overlib.js (or on page). This parameter can be used instead of text.
Variable: ol_texts.
overlib(INARRAY, 1) // use value stored in ol_texts[1] for body text
CAPARRAY id
Tells overLIB to read the caption from the ol_caps array. Variable: ol_caps.
overlib(INARRAY, 1, CAPARRAY, 1) // uses values stored in ol_texts[1] and ol_caps[1]
FUNCTION functionname
Calls the specified function and takes the return value as the text that should be displayed in the popup. The function is called when the overLIB command parser runs.
Variable: ol_function.
overlib(FUNCTION, myFunction(arg1, arg2, arg3)) // Assumes argx, x=1..3 are defined or overlib(myFunction(arg1, arg2, arg3)) // since myFunction must return a string value
STATUS text
Sets the text in the browsers status bar to text. A string whose default is the null string (" ").
Variable: ol_status.
overlib('This popup will show a message in the status bar', STATUS, 'Hi. There!!')
WRAP wrap
Will cause the popup to be 'shrink-wrapped' around its content so that it is no wider then is necessary. A number whose default is off (0). When used on the command line, it acts as a toggle switch to change the current state of the associated default variable to its opposite state. This command is not meant to be used with long text strings.
Variable: ol_wrap.
overlib('This popup is "Shrink-wrapped"', CAPTION, 'Caption String', WRAP)