Disable a checkbox in javascript and recognize it as checked on the server side
Posted
by kuzco
on Stack Overflow
See other posts from Stack Overflow
or by kuzco
Published on 2010-03-17T14:21:03Z
Indexed on
2010/03/17
14:31 UTC
Read the original article
Hit count: 209
I have a checkbox which in some cases may be disabled and checked using javascript, i.e:
var cbTest = document.getElementById("CheckBoxTest");
cbTest.disabled = true;
cbTest.checked = true;
However, when sending a postback, CheckBoxTest.Checked
is false on the server side.
Is it possible to disable the checkbox and still have the server side recognize it as checked?
© Stack Overflow or respective owner