I have a conditional statement that does this if a condition is met.
My if statement is fine, everything else works perfectly.
The idea is that if a certain checkbox is ticked, one of the text input will be set to a certain value and become uneditable. I am having problems with this line. Is there a better way to do this? I cannot figure out what’s wrong!
document.getElementById('amount').onfocus = "this.blur()";
How about disabling it
or making it read only
FIDDLE