<form:checkbox> values get from its id using jquery(#id) always coming as true when
My code is mention below.
In jsp page
<script>
$(document).ready(function(){
alert($("#checkBoxId").val());
});
function onclickfun(value){
if(value==true){
//do what ever
}
}
</script>
check box is
<form:checkbox path="checkBoxPath" id="checkBoxId" onclick="onclickfun(this.checked)"/>
Inside formbackingobjects method the property is set as false.
when I unchecked the check box and then refresh the page always alert as a true.
Please can any one help me to resolve this?
thanks..