HTML/Javascript disabled and then reenabled checkbox is being POSTED

Posted by NeverStopLearning on Stack Overflow See other posts from Stack Overflow or by NeverStopLearning
Published on 2012-12-14T11:00:58Z Indexed on 2012/12/14 11:03 UTC
Read the original article Hit count: 165

Filed under:
|

I have a page with a checkbox that is disabled/reenabled with javascript on button click. If I never disable the checkbox then its value is correctly POSTed, however if I disable the checkbox even once it gets posted without value (posts as "name=" even when checked). I have inspected the POST value through firebug.

Why does it behaves like this? Am I missing something? I ve read somewhere that disabled controls are not posted, thats OK, but this control is not disabled when the submit is clicked.

I am using ASP.NET with more complex setup to test this, but essentially this is the core of the problem. The brower is FF latest.

I found very similar question, however without an answer: disabled control being reenabled but still not posting back contents to server

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about html5