I am using <detail:form>
and <tags:field >
in my jsp page. I tried to see the source code the browser generates using firebug and it showed to me that the form name is "checkForm" and all of the field names has "check." as a prefix. So one of the field's (it is a radio button) name is check.isEndorseByApplicant
.
What I am trying to achieve is, when a some element in a drop down menu is selected, I wanted to change the radio button from yes to no. The problem is since the field contains dot in its name, I can't do that. i.e document.checkForm.check.isEndorseByApplicant is not working for me. There is no way I can take out the dot from the field's name at this time. Any ideas?
function autoSelect(checkEndorsement)
{
alert(document.checkForm.check.isEndorseByApplicant)
if(checkEndorsement.value=="Student")
check.isEndorsedBy[0].checked=true;
else
check.isEndorsedBy[1].checked=true;
}
</html:javascript>
. . .
<detail:form object="check" >
. . . .
<td><tags:field property="isEndorseByApplicant" onclick="autoSelect(this.form);" /></td>
Use document.checkForm.elements['check.isEndorseByApplicant']
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With