posted 18 years ago
Hi,
Please I need some help...
Everytime I submit the value of a checkbox it gets "false" even though I check it.And even if the value was checked when the page loads and I submit the form the checkbox does not maintain its value.
I'm using the request.getParameterMap() method to see what the values of my form are.
I'm also using javascript to set the value of the checkbox but it doesn't work...here are the function and the html code:
function setCheckbox(checkbox,columnName){
alert(checkbox.getState());
if(checkbox.checked){
document.getElementsByName(columnName).value="true";
}
else{
document.getElementsByName(columnName).value="false";
}
}
<td>
<input type="checkbox" name="<%=pageColumns.getName()%>" checked onCclick="setCheckbox(this, modify_<%=pageColumns.getName()%>)" />
<input type="hidden" name="modify_<%=pageColumns.getName()%>" id="modify_<%=pageColumns.getName()%>" />
</td>
Thanks...