Couldn’t be because of browser differences. I have tested in Chrome aswell. Could it be an error in my code? When I press the check box, the textbox is suppose to be disabled. this doesn’t have so far. Here is the code I have:
I put the script on the top of the section of the page.
Form name : frmPost
<script type="text/javascript">
function enabledisable() {
if (document.getElementById("ePrice").checked) {
document.frmPost.txtPrice.disabled=false;
} else {
document.frmPost.txtPrice.disabled=true;
}
}
</script>
<input type="text" name="txtPrice" id="txtPrice" size="5">
<input type="checkbox" id="ePrice" name="ePrice" onclick="enabledisable()"/>
Checked it on IE9, Chrome and Firefox
All is ok. Are you sure, that your form is named as frmPost?
And I believe that input txtPrice should be disabled by default