Jump to content

Tables in IE and Mozilla


Guest Darren Line

Recommended Posts

Guest Darren Line

Until now, I never had to worry about cross browsers as all browsers in our company use IE. HOwever, an issue has arised where I have to look at other browsers and noticed some odd results being displayed.Basically, when the user clicks on a row, a table below it appears (using javascript), in IE, the properties of this table are set to 100% and in IE, it fills across the screen. However in Mozilla it doesn't.My example code is...<table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr class="hand" onClick="toggleDn(1);"> <td>TEST</td> </tr> <tr> <td><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FF0000" id="tbl_1" style='{display : none}' > <tr> <td height="50" align="center">TEST MESSAGE</td> </tr> </table></td> </tr></table>The toggleDn function goes like thisfunction toggleDn(DnRecNo){ if (document.getElementById('tbl_'+DnRecNo).style.display == 'none') { document.getElementById('tbl_'+DnRecNo).style.display = 'inline'; } else { document.getElementById('tbl_'+DnRecNo).style.display = 'none'; }}Can anyone help me why it is not being displayed properly.Many thanksDarren

Link to comment
Share on other sites

Does changing:

<td><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FF0000" id="tbl_1" style='{display : none}' >

To:

<td width="100%"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FF0000" id="tbl_1" style='{display : none}' >

help at all?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...