Click here to Skip to main content
14,303,648 members
Rate this:
Please Sign up or sign in to vote.
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.
<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

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.
Updated 19-Apr-13 9:42am

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100