Closed
Bug 310661
Opened 19 years ago
Closed 19 years ago
table.insertRow(0) does not appear to produce an error, but has no visible effect
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 264412
People
(Reporter: steve.teale, Unassigned)
References
()
Details
Attachments
(1 file)
|
946 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.7.12) Gecko/20050919 Firefox/1.0.7
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.7.12) Gecko/20050919 Firefox/1.0.7
<html>
<head>
<script>
function insrow()
{
var table = document.getElementById("thetable");
var row = table.insertRow(0);
var cell = row.insertCell(0);
cell.innerText = "XXX";
cell = row.insertCell(1);
cell.innerText = "YYY";
alert("OK");
}
</script>
</head>
<body>
<form>
<button onclick="insrow()">Go</button>
<table id=thetable width=300>
<tbody>
</tbody>
</table>
</form>
</body>
</html>
Reproducible: Always
Steps to Reproduce:
1.Create an html file from the text in details
2.Load it File -> Open File
3.Click the Go button
Actual Results:
The alert "OK" was displayed, but no table row. Works fine in IE6.
Expected Results:
I expect to see a row:
XXX YYY
Comment 1•19 years ago
|
||
*** This bug has been marked as a duplicate of 157578 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
Comment 2•19 years ago
|
||
I'm sorry for bug spams.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Comment 3•19 years ago
|
||
Using appendChild and createTextNode causes it to work. innerText is not supported. search on Bugzilla for 'innerText', or search for 'innerText' here: http://www.mozilla.org/docs/web-developer/upgrade_2.html#dom_unsupp
Comment 4•19 years ago
|
||
*** This bug has been marked as a duplicate of 264412 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago → 19 years ago
Resolution: --- → DUPLICATE
Comment 5•19 years ago
|
||
(In reply to comment #3) innerHTML works as well. <html> <head> <script type="text/javascript"> function insrow() { var table = document.getElementById("thetable"); var row = table.insertRow(0); var cell = row.insertCell(0); cell.innerHTML = "XXX"; } </script> </head> <body> <a href="javascript:insrow()">Go</a> <table id="thetable" width="300"> <tbody> </tbody> </table> </body> </html>
You need to log in
before you can comment on or make changes to this bug.
Description
•