Closed Bug 130887 Opened 23 years ago Closed 23 years ago

javascript "display: none" not working with tables

Categories

(Core :: DOM: CSS Object Model, defect)

x86
Windows 2000
defect
Not set
major

Tracking

()

VERIFIED DUPLICATE of bug 92868

People

(Reporter: gr+bugzilla, Assigned: jst)

Details

Attachments

(1 file, 1 obsolete file)

The function below is supposed to switch on/off the display of an element. It work for most element types (div, tbody, others) but not for table. function hideshow(which) { //shows or hides a div, used for info pannels and tree obj = document.getElementById(which); if ((obj.style.display == null) || (obj.style.display == "")) obj.style.display="none" else obj.style.display="" } Reproducible: Always Steps to Reproduce: 1. Create an html document on a text editor. 2. Insert a <script> and paste the function 3. Insert a table, e.g. eg <table id="rockme" style="display:none">. 4. Outside the table tag, insert a link with href="javascript:hideshow('rockme');" 5. Open the page in Mozilla, click the link. Actual Results: The table will be showed, but re-clicking the link will not hide it. Expected Results: clicking the link should switch the table display on/off. I am on instant messenger ICQ - 5671715 Yahoo - gabrielradic MSN - gradic@hotmail.com
Attached file HTML testcase (obsolete) —
Confirming bug; Mozilla trunk binaries 20020311xx WinNT, Linux. You can toggle the <DIV> element back and forth ad infinitum, but you can only toggle the <TABLE> element twice - Browser, not engine ---> DOM Style OS: Win2K ---> All cc'ing Boris, jkeiser -
Assignee: rogerl → jst
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → DOM Style
Ever confirmed: true
QA Contact: pschwartau → ian
Note: the testcase passes in IE6. You can toggle each element ad infinitum.
Comment on attachment 74120 [details] HTML testcase Original testcase has a minor error; obsoleting it
Attachment #74120 - Attachment is obsolete: true
This got fixed on the 12th by bug 92868. Worksforme in a March 14 build (though fails in a March 11 build as Phil describes). *** This bug has been marked as a duplicate of 92868 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Marking Verified - the testcase works fine with a trunk build from today, 2002-03-14, on WinNT. Thanks, Boris!
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: