I want to call a JavaScript function OnClick of a button:
<button onclick="'javascript: myJSFunction('VAR1')">Do Something!</button>
Because this button is in a XSL stylesheet, I want to pass an xsl variable to my JavaScript function:
<button onclick="'javascript: myJSFunction(<xsl:value-of select="@ID"/>)">Anmelden!</button>
But this code is invalid due to the false escaping. I tried nearly everything, with(out) any quotes but without any success.
How is the correct syntax to pass an xsl variable to my JavaScript function?