LLF
LLF

Reputation: 707

Radio button with return false javascript still invoke onchange with old value

I have a radio button that bind to change event and check it's value. But when that radio button was also bind with on click for disable, it's still invoke change event with clicked value.

How can i fix this problem so it won't call change or call change without value of clicked radio button.

Fiddle Demo

Thank you in advance.

Upvotes: 0

Views: 315

Answers (1)

zgood
zgood

Reputation: 12571

I changed the selector input[type=radio][name=test] to input[type=radio][name=test]:not(.radreadonly) so that event handler would not be attached to radio buttons with the readonly class.

Fiddle

Upvotes: 1

Related Questions