Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hope it makes sense:

I have situation something like below. Two radio button with onactivate,ondeactivate,onlclick event. For simplicity i mention it as below but in actual code the entire DOM is construction using Javascript and at various points these events are attached.
XML
<pre lang="HTML">
<tr><td><input name="rdo_123_CC" id="rdo_123_CC"  onactivate="fonactivate(1)"  ondeactivate="fdeac(1)" onkeypress="onChange(event,1)" onclick="onChange(event,2)" type="radio" value="1" >Yes
</td><td><input name="rdo_123_CC"  id="rdo_123_CC"  onactivate="fonactivate(2)"  ondeactivate="fdeac(2)" onkeypress="onChange(event,1)" onclick="onChange(event,2)" type="radio" checked="checked" value="2" >No
</td></tr>
</pre>


ISSUE : Order of events on back to back click on Yes No should be:
on clicking YES:
activate 1
RBOnChange 1
on clicking NO:
deactivate 1
activate 2
RBOnChange 2
So forth...

works smooth in IE8,9(quirks) but in IE10 quirks mode: for one of radio button(say No), it just hit deactivate event but then doesn't hit activate and Radio onclick event. After clicking 'NO'several times it selects 'NO'. and then again if i click 'YES' it behaves fine ie. fires deactivate for 'NO' and then activate on 'YES' and Radiobtn click on 'YES'.
while clicking 'NO' several time , I observed that it follows the order correctly ie, it first fired deactivate then stopped, then on second click of 'NO' fires activate, then nxt click again fires deactivate and then activate and in the last fired Onclcik.
It is happening only in my actual code. Above examples behaves correctly in IE10 quirks.

Here I am asking this to know the steps that i can take to figure out why such behavior might happen.
Thanks.. hope your time is not wasted reading all this.

One more thing i like to add...if, instead of clicking, i use Keyboard arrow key(left,right) after i get focus on radio button, then it behaves fine. Issue is only when I click radio buttons.
Posted
Updated 19-Apr-13 9:42am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900