It can't be due to browser discrepancies because I also tested it in Chrome. Is there possibly an error in my code? The checkbox is supposed to disable the textbox when clicked, but that's not happening. Here is the code I am using: I placed the script at the top of the page's section.
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()"/>