jPopUp

Syntax:

jPopUp(txt[,left,top,width,img,btn1,handler1,btn2,handler2])

Description:
The function jPopUp displays a pop-up message box containing the text txt.

The txt parameter is mandatory; all other parameters are optional. You can supply HTML-formatted text in the txt parameter. The style and color of the pop-up message can be specified through global variables.

Parameters:
txt String specifying the text to be displayed in the pop-up message. It may be HTML-formatted (for example, it may contain images, hyperlinks, buttons, etc.)
left Optional parameter. Specifies the x-coordinate of the top left corner of the pop-up message. If left is zero or null or omitted, the x-coordinate of the pop-up message will be chosen based on the mouse pointer's x-coordinate. If left is 'C' or 'CENTER' (or any non-empty string), the pop-up message will be horizontally centered on the page.
top Optional parameter. Specifies the y-coordinate of the top left corner of the pop-up message. If top is zero or null or omitted, the y-coordinate of the pop-up message will be chosen based on the mouse pointer's y-coordinate. If top is 'C' or 'CENTER' (or any non-empty string), the pop-up message will be vertically centered on the page.
width Optional parameter. Specifies the desired width of the pop-up message. (The height of the message box is determined according to the actual height of the message content, given the width.) If width is zero or null or omitted, then both width and height of the pop-up message will be based on the actual width and height of the message content.
img Optional parameter. Specifies the name of the image file containing the icon to be displayed in the top left corner of the message box. If the file name extension is not specified, .GIF extension is assumed. The path of the image file is determined by the jPopUpIconsDir global variable. The icon size must be 32x32 pixels. If img is an empty string or zero or null or omitted, then the pop-up message will not display any icon in its top left corner.
btn1 Optional parameter. Specifies the text on the first (left) button at the bottom of the pop-up message. If btn1 is an empty string or zero or null or omitted, then the button will not be displayed.
handler1 Optional parameter. Contains the JavaScript event handler code for the click event associated with the button btn1. For example, if you'd like to call the function myHandler() when the user clicks on the button btn1, pass the string 'myHandler()' as the value of the handler1 parameter. If handler1 is an empty string or zero or null or omitted, then the only action triggered by clicking the button btn1 will be removing the pop-up message itself.
btn2 Optional parameter. Specifies the text on the second (right) button at the bottom of the pop-up message. If btn2 is an empty string or zero or null or omitted, then the button will not be displayed.
handler2 Optional parameter. Contains the JavaScript event handler code for the click event associated with the button btn2. If handler2 is an empty string or zero or null or omitted, then the only action triggered by clicking the button btn2 will be removing the pop-up message itself.

Copyright © 2000, Alexei Kourbatov