Closed
Bug 280066
Opened 20 years ago
Closed 20 years ago
visibility toggling using CSS doesn't work
Categories
(Firefox :: General, defect)
Firefox
General
Tracking
()
RESOLVED
INVALID
People
(Reporter: rkagan, Assigned: bugzilla)
References
()
Details
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041219 Firefox/1.0 (Debian package 1.0+dfsg.1-1) Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041219 Firefox/1.0 (Debian package 1.0+dfsg.1-1) In the page http://chiron.ccs.yorku.ca/test the CSS style "hidden" has the attribute {visibility: hidden;} The radial buttons toggle this value between hidden and visible. The toggling of the hidden value does not occur. This works in IE (sorry to say that ;( ) but doesn't work in both Mozilla Firefox or Mozilla 1.7.3. The code for the page is: <html> <head> <style type="text/css"><!-- .hidden { position: absolute; visibility: hidden; } //--></style> <script type="text/javascript" language="JavaScript"><!-- function set(What,Value) { if (document.layers && document.layers[What] != null) document.layers[What].visibility = Value; else if (document.all) eval('document.all.'+What+'.style.visibility ="'+ Value+'"'); } function clicked(Form,Radio,Layer) { for (var i=0; i<Form[Radio].length; i++) { if (Form[Radio][i].checked) set(Layer,Form[Radio][i].value); } } //--></script> </head> <body> <form> <input type="radio" name="button1" value="visible" onClick="clicked(this.form,this.name,'myLayer')"> <input type="radio" name="button1" value="hidden" onClick="clicked(this.form,this.name,'myLayer')" checked> </form> <div id="myLayer" class="hidden"> <form> <select> <option value="one">one <option value="two">two <option value="three">three </select> </form> </div> </body> </html> Reproducible: Always Steps to Reproduce: 1. go to http://chiron.ccs.yorku.ca/test (simple test page) 2. toggle the radial button (choose the left one Actual Results: A select menu should appear Expected Results: The select menu remains hidden
That code is straight out of 1998. Firefox is neither IE (document.all) nor Netscape 4 (document.layers). document.getElementById(What).style.visibility = Value; would work.
My apologies of my web coding ignorance.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•