Popup-in-Popup Command Reference

Go to the boughner.us

Purpose

The purpose of this plugin module is to provide the support that will allow users to be able to display a popup within a popup, which isn't possible in current releases of overLIB. The support provided here is available in all supported browsers, including Netscape 4.x. Secondary popups have only the basic overLIB functionality; advanced features such as Shadow effects or CSSSTYLE and CSSW3C styling aren't possible. In addition, secondary popups can only be used with STICKY primary popups, which don't have the DRAGGABLE, NOCLOSE, and MOUSEOFF commands applied or are a cross-frame STICKY. A little later the basic commands that can be used with secondary popups will be indicated.

The secondary popup feature is achieved by having another DIV container, just like the primary overDiv container, to hold popup content. This container doesn't need to be defined within your document, but can be if you want to. If not defined, it will be dynamically created and temporarily added to the document's object tree, and will cease to exist once the document is removed from your browser. You'll also be able to specify the ID you want to associate with this DIV container. If you don't supply an ID, a default value of overDiv2 is used. The layer object associated with this secondary DIV container is over2. Since secondary popups are only associated with STICKY primary popups, they won't follow the cursor's movement over the triggering link because that feature is disabled for that kind of primary popup, which is inherited by the secondary popup.

If you make use of the capabilities included with this module, you are strongly encouraged to place the primary popup's text in an external string variable (or as an element of a text array) within a script block in the HEAD section rather than trying to place the text on the line which makes the call to the primary popup. By doing that you'll better be able to manage the nested quotation marks that are sure to ensue. You'll find that most of the properties defined for the primary popup are inherited by the secondary popup, but that can changed in the command which invokes the secondary popup, which is overlib2(command line arguments). The secondary popup is dismissed by calling nd2(). Both of these functions handle only the basic capabilities associated with an overLIB popup.

To include this support module just include the following statements in the HEAD section of your document:

<SCRIPT TYPE="text/javascript" SRC="overlib.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" SRC="overlib_overtwo.js">
</SCRIPT>

You only have to make sure that the overlib_overtwo.js module is loaded after the core module.

Download this module as a zip file.

Unsupported Basic Parameters

None of the parameters in any module other than the core module, or the following basic parameters of the core module, are supported for secondary popups.

  • AUTOSTATUS
  • CAPICON
  • CLOSECLICK
  • CLOSECOLOR
  • CLOSEFONT
  • CLOSESIZE
  • CLOSETEXT
  • CLOSETITLE
  • DELAY
  • FOLLOWMOUSE
  • FRAME
  • FULLHTML
  • HEIGHT
  • MOUSEOFF
  • NOCLOSE
  • PADX
  • PADY
  • STATUS
  • STICKY
  • TIMEOUT

Commands

PUID divID
The ID name, a string value, to be assigned to the DIV container that will hold the secondary popup's content. This value must be unique on the page. If no value is assigned, it defaults to overDiv2.
Variable: ol_puid
 
CAPALIGN alignment
Horizontal alignment of caption text within its table cell, a string value, with a value of either 'left', 'center', or 'right'. Default value is the null string ('') which aligns text on the left. NOTE: applies only to a secondary popup.
Variable: ol_capalign
TEXTALIGN alignment
Horizontal alignment of main popup content, a string value, with a value of either 'left', 'center', or 'right'. Default value is the null string ('') which aligns text on the left. NOTE: applies only to a secondary popup.
Variable: ol_textalign

These last two commands are not really necessary but have been added as a convenience because this capability is not present in a normal popup. The same functionality can be achieved by making use of custom classes and CSS.

Example

This is a sample of a popup within a popup. It uses the following instructions written in the HEAD section of the document:

var references=new Array();
references[0]=' onMouseOver="return overlib2(INARRAY,0,'+
  'CAPARRAY,0,WIDTH,200, WRAP,FGCOLOR,\'#FFCCCC\');"'+
  ' onMouseOut="nd2();"';
references[1]=' onMouseOver="return overlib2(INARRAY,1'+
 ',CAPARRAY,1,WIDTH,200,WRAP,FGCOLOR,\'#FFCCCC\','+
 'CAPALIGN,\'center\',TEXTALIGN,\'center\');"' +
 ' onMouseOut="nd2();"
references[2]=' onMouseOver="return overlib2(INARRAY,2,'+
  'CAPARRAY,2,WIDTH,200,WRAP,FGCOLOR,\'#FFCCCC\','+
  'CAPALIGN,\'right\',TEXTALIGN,\'right\');"'+
  ' onMouseOut="nd2();"';
ol_texts[0]="Normal alignment";
ol_texts[1]="Center alignment";
ol_texts[2]="Right alignment";
ol_texts[3]="Displays an alert if the DIV container is not" +
  " defined.<br><center><font size='0'><strong>Ns4.x only"+
  "</strong></font></center>";
ol_caps[0]="NORMAL";
ol_caps[1]="CENTER"; 
ol_caps[2]="RIGHT"; 
var myText = "<p>This example has three command lines" +
  " demonstrating  the alignment features of a secondary" +
  " popup.</p>"+ 
  "<ul><li><a href='javascript:;'"+references[0]+">Normal</a>"+
  " alignment example</li>" + 
  "<li><a href='javascript:;'"+references[1]+">Center</a>"+
  " alignment example</li>" + 
  "<li><a href='javascript:;'"+references[2]+">Right</a>"+
  " alignment example</li></ul>";

As you can see, the potential for having unbalanced quotation marks is very high if you try putting this code in line in a call to overLIB. Placing it in separate variables as demonstrated here helps, but could still cause problems if one is not very careful.

Back to Top


Thank you for visiting boughner.us - Come back again soon.