How to pass table id generated within XSL via generate-id() function to the java script?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



How to pass table id generated within XSL via generate-id() function to the java script?



I am trying to call click function for each xsl value-of and display it via alert() function. $("#$CID td").click(function()
I am not able to pass the value that I generated in XSL (CID) to the java script function.


alert()


$("#$CID td").click(function()


<xsl:template>
<html>
<head>
<script>
$(document).ready(function() {
$("#$CID td").click(function()
var value=$(this).data("value");
alert(value);
);

</script>
</head>
<body>
<xsl:if test="count(/Files/notes/note) &gt;= 0">
<div class="section">
<div colspan="4" class="sectionHeader">
<b>Sections</b>
</div>
<xsl:for-each select="/Files/notes/note">
<xsl:variable name="CID" select="generate-id()" />
<table id="$CID" width="100%" class="clsGridTableBase">
<tr>
<td data-value="@AID"> Note Id:
<xsl:value-of select="@BID" />
</td>
</tr>
</table>
</xsl:for-each>
</div>
</xsl:if>
</body>







What do you mean by "call click function"? Where is the code that does this?
– Jim Garrison
Aug 12 at 5:12





when I click on Note id:<value>, .click function gets called. similar to this one here - jsfiddle.net/uKaBH , only problem being I am not able to pass dynamic id from xsl to js.
– Gp Aravindan
Aug 12 at 6:12










By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard