IE 8 fix for onChange event on radio buttons

The onChange event never works on IE8 for radio buttons.

Workaround: To blur and to focus back is the only solution I found.

Therefore, if you need to fire an onChange event on a radio button:


1.       Register ‘click’ event on radio button element instead of ‘change’.
2.       In the respective function, add the following just before the function ends:

Doing this, the radio buttons will act the same way on clicking as it would have acted with onChange.

Receive our updates to your inbox

Get more stuff like this
in your inbox

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.