views:

112

answers:

1

IE 8 crashes with the following javascript but the same code works fine in IE6, IE7, IE8(IE7mode), FF3, Chrome and Safari. Has anyone run into this? Any known workarounds?

Thanks in advance, -dk

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<head>
<script type="text/javascript">
function HideColumn(){
    document.getElementById('hide1').style.display = 'none';
}
</script>    
</head>
<body>
<button onClick="HideColumn();">Hide Column</button>
<table class="grid" border="1" width="300">
    <tbody>
        <tr>
            <td>A1</td>
            <td id="hide1" rowspan="3" style='background:silver'>HIDE ME!</td>
            <td>C1</td>
        </tr>
        <tr>
            <td colspan="3">&nbsp;</td>
        </tr>
        <tr>
            <td>A3</td>
            <td>C3</td>
        </tr>
    </tbody>
</table>
</body>
</html>
A: 

consider forcing ie7 mode. Check out this url: http://blog.timwarr.net/2008/09/29/forcing-compatibility-mode-in-ie8-when-users-view-you-page/

will