Forum Moderators: open

Message Too Old, No Replies

Radiobuttons with IE (ok with Firefox)

But no problem if I recreate the page from view source

         

Philiboy

5:52 pm on Apr 16, 2009 (gmt 0)

10+ Year Member



I have a problem with radio buttons with Internet Explorer. I have included the offending lines below, but a lot of code lies between the opening of the form and again after these few lines and before the end of the form. Plus there is a loop involved (hence the print $i) to get multiple sets of radio buttons. Now, with IE, neither of the radio-buttons are checked by default, but its fine on Firefox. If I do a view source (in IE) and save it to a file and then copy that to the webserver and open it in IE, I see no problem. I think everyone will agree that there is no problem with the code I have provided, but what is the best approach to investigating what is lurking in the rest of the code which is causing the problem? What sort of things should I look for which are known to cause this in IE?

<table width="100%" border="0" cellspacing="2" cellpadding="2"><tbody id="optInner2_Search_<?php print $i; ?>" class="projectInnerOptions">
<tr><td> <input name="radiobutton<?php print $i; ?>" type="radio" value="radiobutton1<?php print $i; ?>" checked="checked">text1</br>
<input name="radiobutton<?php print $i; ?>" type="radio" value="radiobutton2<?php print $i; ?>">text2
</td><td>&nbsp;</td></tr>
<!- More table rows follow-->
</table>

Any help will be greatly appreciated.

Receptional Andy

6:13 pm on Apr 16, 2009 (gmt 0)



Is every button checked? If so, it's hard to predict what would be the best browser behaviour, and only one button should be checked.

Otherwise, the first two steps I would take are:

- Validate the HTML

- Disable caching and additional technologies like javascript, CSS etc. in IE