Promotic

Opening the viewer of Web pages (/#glob/webbrowser)

The viewer of general Web pages is opened by by the Pm.CreateView method. In the sViewPath parameter the global path "/#glob/webbrowser" is entered.
Syntax:
JavaScriptVBScriptSelect and copy to clipboard

var oCreator = Pm.CreateView(oFrom, "/#glob/webbrowser", sViewPars, sFramePars);
oCreator.Open();
Viewer parameters:
oFrom(Object) The object, which will mediate the opening of the viewer.
The object specifies the origin of the path, the relative position of the window, the parent, etc..
- The null value means the usage of:
- the PmaPanel object if the CreateView method is called in the script of the Pmg object.
- active PmaWorkspace, if the CreateView method is called in the script of the Pma object.
- If the the PmgFrame object is entered here (in the script of the Pmg object), then the viewer opens in this frame.
- If the the PmaPanel object is entered here (in the script of the Pma object), then the viewer opens in this selected object.

See the PmViewCreator.From property.
sViewPars(String) Viewer parameters (they differ for various viewer types)
Entries are in the KeyVal format, for example "name1:value1;name2:value2;".
See the PmViewCreator.View property.

Viewer parameters:
url(String) The URL address of the Web page defined in full syntax including the protocol (http://, https:// or file://).
sFramePars(String) Parameters for the frame where the viewer will be displayed
Entries are in the KeyVal format, for example "target:_blank;".
See the PmViewCreator.Frame property.
The viewer parameters are in the form of the PmMap object that is filled from value of the sViewPars parameter (of the KeyVal type) in the Pm.CreateView method.
By filling from the KeyVal value all the parameters are initially stored as string. The content of the PmMap object can be then modified as needed - items can be modified, added and deleted.
The PmMap object can also contain other embedded PmMap objects (Submap). The PmMap.mapSetSubmapAt method can be used in order to create a new PmMap or make one accessible.
Example:
Opening the viewer of Web pages in a separate window
JavaScriptVBScriptSelect and copy to clipboard

var oCreator = Pm.CreateView(null, "/#glob/webbrowser", "url:https://www.promotic.eu", " target:_blank; dependent:0; ");
oCreator.Open();

History:
Pm9.00.09: Created
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.