Global Variables

Global variables of the JPOPUP Library help you consistently define the look-and-feel of all pop-up messages on your HTML page. In most cases, you'll set the global variables in the HEAD section of your page. For example, if you'd like to use blue text and blue 2-pixel wide border for all your messages, you can set the following variables in the HEAD of your page:

<script language="JavaScript">
<!--
jPopUpBorderColor="blue"
jPopUpBorderWidth=2
jPopUpFontColor="blue"
//-->
</script>
You can use the following global variables:
  • jPopUpStyle
  • jPopUpFontFace
  • jPopUpFontSize
  • jPopUpFontColor
  • jPopUpBgColor
  • jPopUpBorder
  • jPopUpBorderColor
  • jPopUpShadow
  • jPopUpShadowColor
  • jPopUpMargin
  • jPopUpRemoveDistant
  • jPopUpIconsDir
  • jPopUpReturnValue

    jPopUpStyle

    The jPopUpStyle global variable contains an integer specifying the current style of pop-up messages. The default value is jPopUpStyle=0. For more information, see Styles.

    jPopUpFontFace

    The jPopUpFontFace global variable contains a string that sets the font name for pop-up messages. The default value is "Arial,Helvetica,Geneva,sans-serif". For more information, see Fonts.

    jPopUpFontSize

    The jPopUpFontSize global variable contains a number that sets the font size (in points) for pop-up messages. The default value is jPopUpFontSize=10. For more information, see Fonts.

    jPopUpFontColor

    The jPopUpFontColor global variable contains a string that sets the font color for pop-up messages. The default value is jPopUpFontColor="black". For more information, see Fonts.

    jPopUpBgColor

    The jPopUpBgColor global variable contains a string that sets the background color for pop-up messages. The default value is jPopUpBgColor="#FFFFEE". For more information, see Colors.

    jPopUpBorder

    The jPopUpBorder global variable contains a number that sets the border width (in pixels) for pop-up messages. The default value is jPopUpBorder=1. For more information, see Borders.

    jPopUpBorderColor

    The jPopUpBorderColor global variable contains a string that sets the border color for pop-up messages. The default value is jPopUpBorderColor="black". For more information, see Borders.

    jPopUpShadow

    The jPopUpShadow global variable contains a number that sets the shadow width (in pixels) for pop-up messages. The default value is jPopUpShadow=8. For more information, see Shadows.

    jPopUpShadowColor

    The jPopUpShadowColor global variable contains a string that sets the shadow color for pop-up messages. The default value is jPopUpShadowColor="#AAAAAA". For more information, see Shadows.

    jPopUpMargin

    The jPopUpMargin global variable contains a number that sets the margin width and height (in pixels) for pop-up messages. The default value is jPopUpMargin=4. For more information, see Margins.

    jPopUpRemoveDistant

    The jPopUpRemoveDistant global variable specifies whether the existing pop-up message should be removed when the mouse pointer has moved far enough. The variable must contain either 1 (remove the message) or 0 (do not remove the message); the default value is 1. This global variable affects only those pop-up messages that do not contain buttons. For more information, see Removing Pop-ups.

    jPopUpIconsDir

    The jPopUpIconsDir global variable contains a string that sets the directory path for images referenced by the img parameter of the functions jPopUp, jPopUpConfirm, jPopUpPrompt, jPopUpLoadIcons. The default value is the relative path popicons/.

    jPopUpReturnValue

    The jPopUpReturnValue global variable contains the value returned by a dialog created with either of the functions jPopUpConfirm or jPopUpPrompt. If the dialog is still active, jPopUpReturnValue contains -1. For more information, see the functions jPopUpConfirm and jPopUpPrompt.

    Copyright © 2000, Alexei Kourbatov