mercredi 4 février 2015

how to fetch value of a dynamically generated check boxes in an array in js file


<ui:grid>
<xsl:for-each select="seeup:seeup[seeup:groupCode=$groupCode][position() mod 3 = 0 ]">
<xsl:variable name = "current-pos" select="(position() - 1) * 3+1" />
<ui:row>
<xsl:for-each select="../seeup:seeup[seeup:groupCode=$groupCode][position() &gt;= $current-pos and position() &lt; $current-pos + 3]" >
<ui:cell class="ap-apply-fieldName-grid">
<ui:checkBox name="fieldName">
<xsl:attribute name="class">
ap-apply-fieldName-chkBox
</xsl:attribute>
<xsl:attribute name="value">
<xsl:value-of select="seeup:itemCode"/>
</xsl:attribute>
</ui:checkBox>
<xsl:sequence select="seeup:defaultLabel"/>
</ui:cell>
</xsl:for-each>
</ui:row>
</xsl:for-each>
</ui:grid>


above is the code to create dynamic check boxes based on groupcode list that we'll get from seeup service which all is working fine, but whenever i am trying to fetch the value of selected only check boxes in js onclick function then i am getting value of only the first check box which is getting created in the above loop. thanks in advance. :)





Aucun commentaire:

Enregistrer un commentaire