Files
Mozilla/mozilla/layout/html/tests/table/interactive/bug135112.html
(no author) d368a405db This commit was manufactured by cvs2svn to create branch
'MOZILLA_1_8_0_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_0_BRANCH@185757 18797224-902f-48f8-a5cc-f745e15eee43
2005-12-07 05:54:01 +00:00

75 lines
1.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style type="text/css">
table {
border-collapse: collapse;
}
td {
border: 1px solid blue;
}
</style>
</head>
<body onLoad=handleOnLoad()>
The table below has two rows with blue borders.<br>
If we add a new similar row using DHTML the borders disappear. They may although
show up in small bits and pieces depending on what you do hereafter (using the
menus, opening other windows, and various other things).<p>
<table id="myTable">
<tr>
<th>Column-A</th>
<th>Column-B</th>
<th>Column-C</th>
</tr>
<tr>
<td>A1</td>
<td>A2</td>
<td>A3</td>
</tr>
<tr>
<td>B1</td>
<td>B2</td>
<td>B3</td>
</tr>
</table>
<script>
function handleOnLoad()
{
var table = document.getElementById("myTable");
alert("Now we add a new row");
// Add a new row at the end of the table
var newRow = table.insertRow(3);
var cell;
for (var i=0 ; i<3 ; ++i)
{
if (0)
{
cell = document.createElement("TD");
cell.innerHTML = "C"+(i+1);
newRow.appendChild(cell);
}
else
{
cell = newRow.insertCell(i);
cell.innerHTML = "C"+(i+1);
}
}
}
</script>
</body>
</html>