Promotic

WndHtmlPage - method of the Pm object

Description:
Displays the HTML pages in modal/non-modal window.
This method is obsolete (but functional) and it is better to use the Pm.CreateView method - see Opening the viewer of Web pages (/#glob/webbrowser).
Syntax:
Variant WndHtmlPage(String sURL, [String sStyle], [String sOptions], [Variant vArguments])
Parameters:
sURL(String) HTML page address.
sStyle[optional] (String) Additional parameters that define the display mode of the window.
Entries are in the KeyVal format, for example "modal:yes;".
"modal:yes/no;" (optional) - Flag, if the window is modal (yes) or non-modal (no) (yes = default).
sOptions[optional] (String) Additional parameters for displaying of the window.
Entries are in the KeyVal format, for example "dialogLeft:50px;dialogTop:50px;dialogWidth:300px;dialogHeight:200px;resizable:no;".
"dialogWidth:nnn;" (optional) - Sets the width of the window in entered units (px, mm, cm).
"dialogHeight:nnn;" (optional) - Sets the height of the window in entered units (px, mm, cm).
"dialogLeft:nnn;" (optional) - Sets the position of the window in X-axis in entered units (px, mm, cm).
"dialogTop:nnn;" (optional) - Sets the position of the window in Y-axis in entered units (px, mm, cm).
"center:yes/no;" (optional) - Specifies whether to center the window within the desktop (yes = default).
"resizable:yes/no;" (optional) - Specifies whether the window has fixed dimensions (no = default).
"scroll:yes/no;" (optional) - Specifies whether the window displays scrollbars (yes = default).
"help:yes/no;" (optional) - Specifies whether the window displays the context-sensitive Help icon (yes = default).
"status:yes/no;" (optional) - Specifies whether the window displays a status bar (no = default).
vArguments[optional] (Variant) Parameter that is passed to the displayed HTML page.
It can be of any data type, including an array of values.
HTML page in the window can access this value by means of the "dialogArguments" property of the window HTML object.
Return value:
The return value is meaningful only for the modal window (the sStyle="modal:yes;" parameter).
The HTML page in the window can set this value by means of the "returnValue" property of the window HTML object. It can be of any data type including the value array.
If the property in the HTML page is not set or the window is non-modal then the method returns: null for JavaScript or Empty for VBScript (it can be tested by the Pm.IsValid method).
Note:
Position and size of the window can be stated in the following units: px - in pixels, mm - in millimeters, cm - in centimeters.

This method is not functional in Web panels.
Example1:
Displays the appropriate HTML page in a modal window on the specified position and size. The help icon is disables and the dimensions of the window cannot be changed:
JavaScriptVBScriptSelect and copy to clipboard

Pm.WndHtmlPage("https://www.promotic.eu", "", "dialogLeft:50px;dialogTop:50px;dialogWidth:500px;dialogHeight:300px;resizable:no;help:no;");
Example2:
Displays the text file eula.txt from the Windows system folder in a modal window.
JavaScriptVBScriptSelect and copy to clipboard

Pm.WndHtmlPage("file://" + Pm.DiscGetPath("#winsys:eula.txt"));
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- LN2
- PI
- Pow
- Sin
- Tan
- WndHtmlPage
 
 
© MICROSYS, spol. s r.o.