If I have a checkbox like this in my jsp:
<form:checkbox path="agreeToLegalAgreements" />
It results in:
<input id="agreeToLegalAgreements1" name="agreeToLegalAgreements" type="checkbox" value="true"/><input type="hidden" name="_agreeToLegalAgreements" value="on"/>
Why is a "1" being appended to the id ? The reason I ask is because I have to hardcode the "1" if I want to select this checkbox using javascript:
document.getElementById('agreeToLegalAgreements1').checked=true;