Syntax
| mio_dialog(HTML, buttonsList, callbackFunction, width,height, parentID) |
Parameters
| STRING | HTML | HTML text to be displayed in the dialog box.
| | STRING | buttonsList | 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.
| | STRING | callbackFunction | Optional. JavaScript function to be called when the user click on a button. The index of the button is passed as the first argument. Set to an empty string is no callback function is required.
| | INT,INT | width,height | Optional. Size of the dialog box. If not specified or set to an empty string, the size of the dialog box is set to 300 pixels width and 120 pixels height.
| | 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. You can use the string "main" to designate the main window ID. |
Return value
No value is returned.
Description
Displays a dialog box with up to three buttons.
Full HTML is supported.
If Enter is pressed when the dialog box is visible, the callback function is called with the index set to 0 (first button).
If you want to display an HTML document in the dialog box, check mio_dialog_html.
In addition to mioEngine.js, this function requires gui.k. |
JavaScript Sample Code
<HTML>
<script src="mioEngine.js"></script>
<script>
function showDialog() {
mio_dialog("Hello, World", "Ok|Cancel", "dialog_cb")
}
function dialog_cb(bt) {
alert(bt)
}
</script>
<BODY>
<INPUT type="button" value="Show Dialog" onClick="showDialog()">
</BODY>
</HTML> |
|