a simple hidden DIV can't be visible any more by using javascript instructions.

RESOLVED INVALID

Status

()

Core
JavaScript Engine
RESOLVED INVALID
14 years ago
14 years ago

People

(Reporter: wildmaple, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616

i am composing a html page with a hidden DIV that is expected to be displayed 
when clicking an javascript functioned hyperlink. it seem to work in IE6, but 
failed in Mozilla 1.7 .
the codes i used as follows:

<a href=# onclick='if("hidden"!=hiddendiv.style.visibility)
{hiddendiv.style.visibility="hidden";}else
{hiddendiv.style.visibility="visible";};hiddendiv.style.height="auto";'><b>More 
Things</b></a>£º£¨Click me to get more£©

<div id=hiddendiv style="visibility:hidden;">
12344321 yes , it's me!
</div>

Reproducible: Always
Steps to Reproduce:
1.place the codes i provided above in a html page.
2.open the page with Mozilla 1.7 .
3.click the hyperlink "More Things".

Actual Results:  
indeed nothing will happen.


Expected Results:  
we are expecting to see the hidden DIV here.

IE6 performs exactly as i expected, so i think it should be like this as i 
experienced with IE6, maybe i am wrong, maybe it is not an industry standard, 
maybe i coded baddly.

Comment 1

14 years ago
Your syntax is not valid.

Try document.getElementById("hiddendiv").style(etc).

http://devedge.netscape.com/viewsource/2001/updating-dhtml-web-pages/ can be a
useful reference.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.