0

I have 3 radio button inputs in three separate divs:

<div class="box1">
  <input type="radio" name="paymentOption" checked="checked" value="creditcard_on_file" />
  <!-- related subfields for that chosen option -->
</div>
<div class="box2">
  <input type="radio" name="paymentOption" value="newCard" />
  <!-- related subfields for that chosen option -->
</div>
<div class="box3">
  <input type="radio" name="paymentOption" value="check" />
  <!-- related subfields for that chosen option -->
</div>

on page load, the first one is default selected. and in IE9, when another is clicked, the first one stays selected! whoa.

what can I do to make it behave properly?

Kristian
  • 21,204
  • 19
  • 101
  • 176
  • There is absolutely nothing wrong with the code you have posted, as [this jsfiddle proves](http://jsfiddle.net/mPwpV/) when run in IE9. You must have something else going on in your page to cause this issue. Maybe you have event handlers, or some other type of javascript/jquery having an effect? – freefaller Oct 25 '12 at 17:43
  • I tried your code with IE9 and it works well. – Marc Oct 25 '12 at 17:43
  • OK. thanks. i'll take a look at event handlers – Kristian Oct 25 '12 at 17:45

3 Answers3

0

it works fine for me.. but if its a compatibility issue. try using JavaScript to clear out the other items.

try this: How to reset radiobuttons in jQuery so that none is checked

Community
  • 1
  • 1
Relentless
  • 122
  • 6
0

There was a typo in some other html surrounding the given markup. I've learned that IE seems to handle the situations of invalid markup a bit differently that other browsers in that it either duplicates a section, or will hide a section. Since in this case neither of those issues occurred, the markup within incorrect html has misbehaved.

Kristian
  • 21,204
  • 19
  • 101
  • 176
0

We had the same problem on IE 9.0.8112 64-bit ONLY but for different reasons. We had forgotten to assign a name to associate the inputs together. The funny thing is that this worked on every other browser, because we were using AngularJS's ng-checked to set the radio button state (even the non-64 bit version of IE 9).

John Lehmann
  • 7,975
  • 4
  • 58
  • 71