-1

Hi there

I have a set of radio buttons each with an onclick event that has a numeric value. When the button is clicked an input box called "Total" is updated with the new value. The problem I'm having is that if a radio button is checked and one clicks on it again then the onclick event is triggered.

Is there any way to prevent the onclick event from triggering if the radio button is already checked?

3
Contributors
2
Replies
4
Views
8 Years
Discussion Span
Last Post by aw2xcd
0

when a radio button is clicked remove its onclick event and when you click on another radio button restore its onclick event

0

mate, use focus instead of click so you can check for if(this.checked)

Hi there

I have a set of radio buttons each with an onclick event that has a numeric value. When the button is clicked an input box called "Total" is updated with the new value. The problem I'm having is that if a radio button is checked and one clicks on it again then the onclick event is triggered.

Is there any way to prevent the onclick event from triggering if the radio button is already checked?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.