Mioplanet Documentation Center
Resources and Help
HomeProductsMioScriptJavaScriptTechNotesPHP
   Home | MioScript | dialog.html SEARCH    

  Functions
dialog.close
dialog.html
dialog.isVisible
dialog.show
dialog.text

  MioScript Reference
> Statements
app...
browser...
dialog...
disk...
draw...
extern...
filename...
keyboard...
menu...
mio...
mouse...
num...
path...
pushButton...
reg...
RS232...
sci...
screen...
shortcut...
sound...
str...
system...
time...
var...
window...

Function
dialog.html

Language: MioScript
Product: MioFactory


Syntax

dialog.html(title, htmlFile, buttons, width,height, functionName, parentID, x,y)


Parameters

STRINGtitleOptional.
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.
STRINGhtmlFileHTML document to be loaded. Local files, network files and URLs are supported.
STRINGbuttonsList 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,INTwidth,heightOptional.
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.
CALLBACKfunctionNameOptional.
Name of the function to be called when the dialog box is closed.
IDparentIDOptional.
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,INTx,yOptional.
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.

Dialog Box

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