|
|
|
|
Functions
MioScript Reference
|
|
Syntax
| dialog.html(title, htmlFile, buttons, width,height, functionName, parentID, x,y) |
Parameters
| STRING | title | Optional. Title of the dialog box. If this parameter is set to null, the application title is used. The application title is defined with app.init or app.title.
| | STRING | htmlFile | HTML document to be loaded. Local files, network files and URLs are supported.
| | STRING | buttons | List of buttons in the bottom of the dialog box, with | as separator. You can define tree buttons as follow: button A|button B|button C
| | INT,INT | width,height | Optional. Size of the dialog box. If not specified or set to null, the size of the dialog box is set to 300 pixels width and 120 pixels height.
| | CALLBACK | functionName | Optional. Name of the function to be called when the dialog box is closed.
| | ID | parentID | Optional. ID of the parent window. When a parent window is specified, the dialog box will always be in front of the parent window, and will be displayed in the same monitor than the specified window.
| | INT,INT | x,y | Optional. Position of the dialog box in the screen. If not specified, the dialog box is centered in the screen. |
Return value
No value is returned.
Description
Displays an HTML document in a dialog box with up to three buttons.
If Enter is pressed when the dialog box is visible, the callback function is called with the index set to 0 (first button).
The MioScript code is not stopped when the dialog box is displayed.
When the user clicks a button, the specified function is called with the index of the button as first argument.
When the user click on a button, the dialog box is hidden but the HTML document is still available, so you can read values, exec a script, etc.
The browser ID of the dialog box HTML document is: &dlg_brID.
You can decide to show the dialog box again with dialog.show.
To customize the color of the buttons, you can proceed as follow before calling the function:
&DLG_BT_A_color = num.rgb(240,255,240) // Color of the first button
&DLG_BT_B_color = num.rgb(255,255,255) // Color of the secondbutton
&DLG_BT_C_color = num.rgb(255,255,255) // Color of the third button
|
More info about browser object: browser...
See also: dialog.text
This function can be called from JavaScript with mio_dialog_html. |
MioScript Sample Code
event.load
dialog.html(null, path.rsc("dialogBox.htm"), "Close|Show Again", dialog_cb)
event.end
function.dialog_cb(&button)
if(&button = 1)
dialg.show()
if.end
function.end
|
|
|
|