here is the generated html code
<input type="checkbox"
name="ajustContrat[0].CAjustTypeAjust" value="on"
onclick="verifierReversible(<%= Integer.parseInt(numLigne) %>)">
Regards
Sallemel
---------- Forwarded message ----------
From: elyes sallem <[email protected]>
Date: 2009/4/8
Subject: event onclick of nested:checkbox
To: Struts Users Mailing List <[email protected]>
Hello,
i have a checkbox to which i associated an event onclick
for this, i call a javascript function verifierReversible
here is the component call
<nested:checkbox property="CAjustTypeAjust" onclick="verifierReversible(<%=
Integer.parseInt(numLigne) %>)">
an here is the javascript function
function verifierReversible(i){
if
(document.forms[0].elements["ajustContrat["+i+"].CAjustTypeAjust"].checked==true){
document.forms[0].elements["ajustContrat["+i+"].CAjustTypeAjust"].value="R";
} else {
document.forms[0].elements["ajustContrat["+i+"].CAjustTypeAjust"].value=null;
}
}
the problem is that Integer.parseInt(numLigne) is not replaced with its
value
any one has an idea?
Regards
Elyes*
*
--
Elyes.