~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/layout/html/tests/table/interactive/bug135112.html

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 
2
<html>
 
3
<head>
 
4
  <style type="text/css">
 
5
  table {
 
6
    border-collapse: collapse;
 
7
  }
 
8
 
 
9
  td {
 
10
    border: 1px solid blue;
 
11
  }
 
12
  </style>
 
13
</head>
 
14
 
 
15
<body onLoad=handleOnLoad()>
 
16
 
 
17
The table below has two rows with blue borders.<br>
 
18
If we add a new similar row using DHTML the borders disappear. They may although
 
19
show up in small bits and pieces depending on what you do hereafter (using the
 
20
menus, opening other windows, and various other things).<p>
 
21
 
 
22
<table id="myTable">
 
23
  <tr>
 
24
    <th>Column-A</th>
 
25
    <th>Column-B</th>
 
26
    <th>Column-C</th>
 
27
  </tr>
 
28
  <tr>
 
29
    <td>A1</td>
 
30
    <td>A2</td>
 
31
    <td>A3</td>
 
32
  </tr>
 
33
  <tr>
 
34
    <td>B1</td>
 
35
    <td>B2</td>
 
36
    <td>B3</td>
 
37
  </tr>
 
38
</table>
 
39
 
 
40
 
 
41
<script>
 
42
 
 
43
function handleOnLoad()
 
44
{
 
45
  var table = document.getElementById("myTable");
 
46
 
 
47
  alert("Now we add a new row");
 
48
 
 
49
    // Add a new row at the end of the table
 
50
  var newRow = table.insertRow(3);
 
51
  var cell;
 
52
 
 
53
  for (var i=0 ; i<3 ; ++i)
 
54
  {
 
55
    if (0)
 
56
    {
 
57
      cell = document.createElement("TD");
 
58
 
 
59
      cell.innerHTML = "C"+(i+1);
 
60
      newRow.appendChild(cell);
 
61
    }
 
62
    else
 
63
    {
 
64
      cell = newRow.insertCell(i);
 
65
 
 
66
      cell.innerHTML = "C"+(i+1);
 
67
    }
 
68
  }
 
69
}
 
70
 
 
71
</script>
 
72
 
 
73
</body>
 
74
</html>