radio buttons and the onChange event handler

B

Bill

Hmmm... the onChange handler for radio buttons only seems to work when I
click on the specific radio button. If I cause it to change - become
unchecked - by clciking on another radio button in the group the handler
doesn't get called. Is this the way it's supposed to work?

I want to set optional properties of certain questions depending upon
whether radion button (a) is clicked or not. Is there some other event I
could set the handler for?

Thanks.
 
T

Thomas 'PointedEars' Lahn

Bill said:
Hmmm... the onChange handler for radio buttons only seems to work when I
click on the specific radio button. If I cause it to change - become
unchecked - by clciking on another radio button in the group the handler
doesn't get called. Is this the way it's supposed to work?

Yes, indeed. I think because checking if there is another radio button that
gets unchecked slows down processing, it is not implemented this way.
I want to set optional properties of certain questions depending upon
whether radion button (a) is clicked or not. Is there some other event I
could set the handler for?

You could use the `onchange' handler of the `form' element, or enclose
the radio buttons in a `fieldset' element and use its `onchange' handler.


HTH

PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top