Your code actually works, but I'm assuming not like you want it to. For text inputs, the onchange event fires after the text box loses focus. If you are wanting to check the 'comp' box as keys are being pressed you may want to use onkeypress, onkeyup or onkeydown.
Also, assuming you only want this box checked if there is actually text in your text box you may want to set up a function instead that checks the value of your 'cant' text box first before checking (or unchecking) the checkbox.
"Given billions of tries, could a spilled bottle of ink ever fall into the words of Shakespeare?"
Bookmarks