XML:
<CONTROLS>
<BUTTON>
<input name="myButton" onclick="existingFunction();"/>
</BUTTON>
<LABEL>
Text ME
</LABEL>
</CONTROLS>
XSLT:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:template match="input">
<input onclick="{@onclick}newFunction();">
<xsl:copy-of select="@*[not(name()='onclick')]"/>
</input>
</xsl:template>
</xsl:stylesheet>
how can i put two functions in one onclick attribute?
result:
<input onclick="existingFunction();newFunction();" name="myButton"/>
its not working. is there any other way to merge this two functions??
i dont want to put the function 2 inside the function 1. 🙂
alternative answer:
call function3() on onClick event .. which looks like