| function setCountMessage() { |
| var tr = document.getElementById("row"); |
| var countCell = document.createElement("td"); |
| countCell.setAttribute("class", "count-table-cell"); |
| tr.appendChild(countCell); |
| var countDiv = document.createElement("div"); |
| countDiv.setAttribute("class", "count-text"); |
| countDiv.innerHTML = "Success!"; |
| countCell.appendChild(countDiv); |
| var right = document.createElement("td"); |
| var below = document.getElementById("below"); |
| document.defaultView.getComputedStyle(below, null).getPropertyValue("width"); |
| // without this, it shows up in both |
| countCell.style.width = 60 + "px"; // without this, is doesn't show up in either |
| <body onload="setCountMessage();"> |
| <table class="count-table"> |