Closed
Bug 18839
Opened 25 years ago
Closed 25 years ago
toggling style.display = 'none'/'table-row' works only once
Categories
(Core :: Layout: Tables, defect, P3)
Tracking
()
VERIFIED
WORKSFORME
People
(Reporter: martin.honnen, Assigned: karnaze)
References
()
Details
Attachments
(1 file)
(deleted),
text/html
|
Details |
I have some code which on button click sets the
.style.display
value of even rows in a table alternatively to
'table-row'/'none'
Setting to 'none' and back to 'table-row' is visually executed once afterwards
the screen display of the rows remains visible though the javascript/dom value
gets set to 'none'.
To check the bug press the button three times. The third press has not the
desired effect.
< SCRIPT> var visible = true;
function toggleRows (tid) {
var table =
document.getElementById(tid);
for (var r = 1; r < table.rows.length; r += 2)
table.rows[r].style.display = visible ? 'none' : (navigator.appName ==
'Microsoft Internet Explorer') ? 'inline' : 'table-row';
visible = !visible;
}
< /SCRIPT>< /HEAD>< BODY>< BUTTON ONCLICK="toggleRows('aTable');"> toggle rows< /BUTTON
>< BUTTON
ONCLICK="alert(document.getElementById('aTable').rows[1].style.display);"> show
rows[1].style.display
< /BUTTON>< BR>< TABLE ID="aTable">< TR BGCOLOR="lime"><
TD> Kibology
< /TD>< TD> for
< /TD>< TD> all
< /TD>< /TR>< TR BGCOLOR="yellow">< TD
> All
< /TD>< TD> for
< /TD>< TD> Kibology
< /TD>< /TR>< TR BGCOLOR="lime">< TD> Kibology
< /TD>< TD>
Reporter | ||
Comment 1•25 years ago
|
||
Comment 2•25 years ago
|
||
In an attempt to get my bug list in order again, marking all the bugs I have
currently as ASSIGNED.
However, the page seems to be working very well for me with today's build so I'm
marking this WORKSFORME
Comment 5•23 years ago
|
||
The given page with .style.display works fine for me on build ID : 2001122603
Marking verified
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•