How to check orbeon xforms:select checkboxes from javascript?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to check orbeon xforms:select checkboxes from javascript?

wiool
Hi,

I would like to check a set of setboxes from a javascript event. Any idea how to do that?

<xforms:select ref="instance('instance')/select" appearance="full" class="folder" id="Demandechekboxes" incremental="true">
        <xforms:item>
                <xforms:label value="$demandeValide/@label"/> 
                <xforms:value value="$demandeValide/@value"/>
        </xforms:item>
</xforms:select>


<input type="checkbox">
        <xsl:attribute name="onChange">
                <xsl:text>javascript:checkCheckboxes();</xsl:text>
        </xsl:attribute>
</input>

<script type="text/javascript"> function checkCheckboxes() { // This doesn't throw any orbeon event document.getElementById("Demandechekboxes$$e0ยท2-1").checked=true; } </script>