O4WDialog routine
Description
Turns the specified element identified by the id parameter (normally a section) into a dialog.
Syntax
O4WDialog(id, title, buttonText, buttonId, options, clickIDs, className)
Parameters
The function has the following parameters:
Parameter | Description |
---|---|
id | The id of an O4W element. |
title | The title tag of the dialog. When null the dialog is removed. |
buttonText | <Optional>An @vm delimited array of text to be displayed on the corresponding buttonId |
buttonId | <Optional>An @vm delimited array of identifiers corresponding to buttonText. The identifier will be returned to the commuter module when the button is clicked. |
options | <Optional> Options to be applied to the jQuery dialog function. |
clickIDs | <Optional> The ID of a button or link to click on to activate the dialog. |
className | <Optional>The named style class to be applied to the dialog. |
Note:
There are two ways to explicitly define the size of the dialog.
First, you can define a "size style", and then pass that in to the "className" parameter of the O4WDialog. To define the size style, call O4WSizeStyle, and pass in an ID to use as parameter #1. For example,
O4WSizeStyle("midSize", "800px", "", "800px")
You must be sure to specify at least the "width" and "minwidth" values here. The O4WSizeStyle is best defined in the CREATE event handler, so that it will be saved in the "overall" HTML document.
Then, in the call to O4WDialog, pass in the defined style ID as the "className" parameter:
className = "midSize" O4WDialog('popupDialog', 'Test Popup Dialog', ButtonTextList, ButtonIDList, "", "", className)
Alternatively, you can specify the size directly. To do so, you'd specify a value in the "options" parameter, with a slightly different syntax. For example,
opts = "width:800" O4WDialog('popupDialog', 'Test Popup Dialog', ButtonTextList, ButtonIDList, opts, "", "")