Calling AjaxMgr methods from Event attributes

Top  Previous  Next

In an XSLT Stylesheet document "{" and "}" characters have a special meaning when they are used in the attributes of the elements.

 

  <input type="text" name="NAME" value="{NAME}" />

The {NAME} definition in the value attribute is replaced with the value of the XML node "NAME" during the XSLT processing. If we need those characters ("{" and "}") in the output HTML document then we have to double them as follows.

XSL StyleSheet Document:

  <input type="text" name="NAME"
     onchange="AjaxMgr.refreshFields({{ actionName: 'Action1', targetElements: 'TE1,TE2' }} )" />

"{{" and "}}" existing in the attributes of the elements are transformed to "{" and "}" during transformation.

Output HTML Document:

  <input type="text" name="NAME"
     onchange="AjaxMgr.refreshFields({ actionName: 'Action1', targetElements: 'TE1,TE2' } )" />