Differences

This shows you the differences between two versions of the page.

Link to this comparison view

jsapi:sub [2025/04/30 03:15]
optrix created
jsapi:sub [2025/04/30 03:16] (current)
optrix
Line 11: Line 11:
 |Callback|Function|A function to be called when the value changes. The function is called with one parameter - the new value| |Callback|Function|A function to be called when the value changes. The function is called with one parameter - the new value|
 |Discrete|Boolean|**True** if this value is treated as a discrete value (ie. not animated)| |Discrete|Boolean|**True** if this value is treated as a discrete value (ie. not animated)|
 +
 +===Example===
 +
 +<code javascript>
 +   var connection = new HMITTPanel();
 +
 +   connection.Sub("Asset Name.Property Name",function(v) {
 +      console.log("New Value: " + v);
 +   });
 +
 +  //Connect to the server here...
 +</code>
  
 ===Notes=== ===Notes===
  
-This function should be called //before// you call [[Connect|connect.]].+This function should be called //before// you call [[Connect|connect]].