I have this problem:
I need to check progamatically a Checkbox named 'comp' only when an input text field named 'cant' receives something.
Here is my code, it is not working at all.
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?"
Hi Sup3rkirby:
My code is not working, I am working on Firefox and Linux Ubuntu, I don't know if there is some kind of problem with this environment but is not working.
Can you see some error in my code???
Let me tell you that this code is inside a Perl script.
Thanks again.
Your code from an HTML/Javascript perspective is fine and it does work (tested in Chrome, Firefox, Opera and Internet Explorer). The operating system won't be the source of any sort of coding issue (only the browser). Again the onchange event for textboxes is fired after the textbox loses focus (meaning you must click somewhere else on the page after typing in the textbox).
If for some reason you are still having trouble (after typing in the box and then clicking somewhere else on the page) then there would likely have to be an error or issue with your Perl script outputting the code. In Firefox you can use the Error Console to view any possible issues that are giving you problems.
"Given billions of tries, could a spilled bottle of ink ever fall into the words of Shakespeare?"
Try Using IE(internet explorer)
On the Advance option you have to disable the debugging
then u might will see the error
Reagrding the script question I have no clue wut you want ???
Bookmarks