Jump to content


Photo

How do I get radio buttons to work with IE6???


  • Please log in to reply
3 replies to this topic

#1 rgrne

rgrne
  • Members
  • PipPip
  • Member
  • 23 posts

Posted 03 September 2006 - 10:55 PM

I just noticed that a group of radio buttons in a website I am developing don't work with Internet Explorer 6.  They work fine with IE5, Mozilla, and Firefox.  The only references to this problem that I have been able to find are related to Javascript and present work arounds that use Javascript.  But I am not using Javascript, just PHP and HTML. I have also posted this in the PHP forum, since I am not entirely sure that it is not a PHP issue. Are there any options tow work around this using just HTML or PHP?

This is the code that I am using. It's PHP but the PHP is just being used to print HTML script.  These lines occur inside a for loop that changes the value of  $entry2 fo each button.

print "<tr align=\"center\" valign=\"middle\">"; 
      print "<td><input type=\"radio\" name=\"game\"  value=\"$entry2\" /></td>";
      print "<td>$entry1</td>";
      print "<td>$entry2</td>";
      print "<td>$entry3</td>";
      print "<td>$entry4</td>";   
      print "<td><input type=\"hidden\" name=\"gamepass\" value=\"$entry5\" /></td>";
      print "</tr>";

I also tried being more XHTML complient by including an ID tag that was different for each button, but to no avail:

print "<tr align=\"center\" valign=\"middle\">"; 
      print "<td><input type=\"radio\" name=\"game\" id=\"$entry2\" value=\"$entry2\" /></td>";
      print "<td>$entry1</td>";
      print "<td>$entry2</td>";
      print "<td>$entry3</td>";
      print "<td>$entry4</td>";   
      print "<td><input type=\"hidden\" name=\"gamepass\" value=\"$entry5\" /></td>";
      print "</tr>";

#2 rgrne

rgrne
  • Members
  • PipPip
  • Member
  • 23 posts

Posted 04 September 2006 - 01:30 AM

Nevermind - managed to solve it on my own.  Tis had nothing to do with syntax for the form.  Turned out that in image outside of the form was creating some kind of "shadow" that only allowed buttons directly above it to work.  Totally diferent issue.

#3 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 04 September 2006 - 01:35 AM

Always validate your html if there is a problem with forms (always validate it anyway!)
follow me on twitter @PHPsycho

#4 dustinnoe

dustinnoe
  • Members
  • PipPipPip
  • Advanced Member
  • 187 posts
  • LocationWarner Robins, GA

Posted 04 September 2006 - 09:34 AM

You may also want to consider escaping php when writing a large chunk of html.  Editors can then highlight your html syntax which will help you notice problems sooner.  If you need to include a php variable just slap a couple of php tags around it.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users