Web view

In the WebView, HTML code can either be displayed statically, which is loaded as a file or via a URL from the network (Internet).

Communication from HTML to the IRControl App

The functions app.call (function, parameter) for calling actions and app.getData (function) for retrieving data from the app are available (see Control Attributes).

Images stored in IRControl can be loaded and displayed in HTML with the prefix «app:» (for example, <img src=“app:pic/ircontrol_logo.png“>)

Communication from IRControl App to the HTML page

An event handler can be used to call a javascript function, which must be present on the HTML page. To do this, the function is defined as an attribute (see Events).

Control attributes

URLURL der Webseite, welche angezeigt wird (zb: http://www.cec.gmbh). Es kann jeweils nur eine URL oder eine HTML Datei konfiguriert werden.
HTML FileURL of the website, which is displayed (eg: http://www.cec.gmbh). Only one URL or one HTML file can be configured at a time.
WebView HandlerWebView handlers define functionality, which is called via Javascript from the HTML file. The following two types of handlers are distinguished:

call
The call function can be used to call one or more actions (for example sending an infrared sequence). In Javascript, the handler is then called via the function «app.call (function, parameter)» (exact call is displayed in the table). The first parameter corresponds to the defined function name. 2. Parameter can be passed to the action for parameters.

getData
This WebView Handler can be used to query Javascript data that is available via a Dynamic Property from IRControl. For this a function name and a dynamic Propery must be defined. In JavaScript, the function is called with «app.getData (function)» (exact call is displayed in the table). The return value of the function corresponds to the return value of the dynamic property (see also Dynamic Attributes).

Layout attributes

The Layout Attributes of a control are described in chapter Control Layout.

Actions

You can define actions for the following triggers:

onstartwill be executed while creating the page after the contro is initialized
onstatechangeWill be called if the state attribute of the control changes.
onrefresh Will be executed, while the refresh event is sent

Mehr zu Actions erfahrst Du im Kapitel Actions.

Events

Folgende Attribute können durch den Eventhandler manipuliert werden:

visibletrue / false
xX coordinate
yY coordinate
widthwidth of the control
heightheight of the control
rotaterotation of the control (in degres)
statefor customer puprpose usable attribute (see also the chapter State Attribute for more information)
javaScriptWhen the event is triggered, the Javascript function of the loaded HTML defined in the value is called.

In chapter Events you can read more about event handling.