agent002
02-28-2004, 06:24 AM
I have been struggling with this problem and I finally came here to ask about it.
I have a checkbox within a label. The checkbox calls a JavaScript function whenever it's checked/unchecked, using the onClick event. It works fine, but when you click somewhere in the label area, the JavaScript isn't called. I tried using onChange instead of onClick, with the same result. Then I tried to add onClick to the label, but with a new problem - the JavaScript is called before the checkbox value is changed.
To see what I mean, try the attachment in my post. All help is appreciated.
I have a checkbox within a label. The checkbox calls a JavaScript function whenever it's checked/unchecked, using the onClick event. It works fine, but when you click somewhere in the label area, the JavaScript isn't called. I tried using onChange instead of onClick, with the same result. Then I tried to add onClick to the label, but with a new problem - the JavaScript is called before the checkbox value is changed.
To see what I mean, try the attachment in my post. All help is appreciated.