I have a project that requires some values to get updated with JavaScript from an HTML radio change event.
For some reason in IE, it seems that the onchange event is
I had the same exact issue. The only options I found were:
Use a js framework that consolidates all of the browser to browser idiosyncrasies (you're going to want to do this, trust me. Have you tested your page in Safari yet?)
If you need the event to trigger but don't want to use onclick
, use onfocus
or onblur
. If you use onblur
for the OTHER radios, it is almost identical.
Just to add, you can force IE to trigger the onChange
event using the onClick
event, so if you are allowed use the onClick
event to trigger the change event, this should do it:
<input type="radio" onclick="this.blur();"/>