mvm_gui_set_html — Set inner HTML of an HTML element.
mvm_gui_set_html( : : ServerHandle, ConnectionHandle, HtmlId, Tuple : )
Sets the inner HTML of an HTML element specified by HtmlId for a connected webclient specified by ConnectionHandle.
Multiple connections can be specified as tuple. A ConnectionHandle with the value 'all' means that the message is sent to all connected clients and is the default. A value of 'first' addresses only the first connection. Additionally, an optional custom error handling can be specified in ConnectionHandle.
For further explanations on connection handles and custom error handling, see the MachineVisionMakers / HDevGUI chapter documentation for this extension package.
The HTML ID HtmlId must match the ID of an existing HTML element.
The following is an example HTML target element:
<div id="myHtmlTarget">
If the option ackTimeoutMillis is set to a positive value (default), the operator mvm_gui_set_html waits for an acknowledge package from the client. If there is no acknowledge package within the given
timeout the operator mvm_gui_set_html returns with error code HDGERR_SERVER_ACK_TIMEOUT. If the HTML ID HtmlId was not found in the client HTML code, the error code HDGERR_SERVER_ACK_NOT_HANDLED will be returned.
ServerHandle (input_control) serial → (handle)
GUI server handle
ConnectionHandle (input_control) socket(-array) → (handle / string)
The destination connection handle
Default value: 'all'
List of values: 'ack_error_ignore', 'ack_error_lowlevel', 'ack_error_raise', 'all', 'connection_error_ignore', 'connection_error_lowlevel', 'connection_error_raise', 'first'
HtmlId (input_control) string → (string)
HTML element ID
Tuple (input_control) integer(-array) → (string / integer / real)
The tuple to be sent
mvm_gui_set_html (ServerHandle, 'all', 'message', '<span style="color: yellow;">Warning: No part could be found!</span>')
Foundation