Skip to content

XmlNode.Live

Overview

void XmlNode.Live ( [ xpath ], [ callback ] )
Attaches a change event handler on specified xpath.

Arguments

String xpath

XPath of nodes to be attached. If not specified current node is selected.

Function callback

Callback function to be execute.

Remarks

This method attaches to existing and created in later future nodes.

This method is only available on client side scripts like Form scripts.

Examples

Receive an alert for changing the customer name

$Xml.Live('//Customer/Name', function() {
  alert('Customer name is changed');
});

Receive an alert for any change all order/count nodes

$Xml.Live('//Order/Count',function() {
  alert( 'Order count is changed.');
});

See Also