NS7 DHTML hide and shown object

wxdqz

New Member
I am working on DHTML and the way to hide and shown object.

Webreference.com give a very simple example (see above) which doesn't work with NS7.

Searching thoughout the Internet, I found that depending of the browser one should should use "hide" or "hidden, but I have try those solutions with no success.

I also known that I can achieve what I want with the "getElementById" method but what I like to understand is why NS7 doesn't understand obj.style.visibility

nb1 : NS7 java consol error message is "Erreur : mypar is not defined"

nb2 : I also searched also on cross-browser DHTML web site, but there examples did not work with NS7 !.
(eg : <!-- m --><a class="postlink" href="http://www.dansteinman.com/dynduo/examples/showhide1.html">http://www.dansteinman.com/dynduo/examp ... hide1.html</a><!-- m -->)


---------------------------------------------------
Example working with IE5.5 but not with NS7.01

<HTML>
<HEAD>
<TITLE>Removing Objects</TITLE>
<!-- simplified from <!-- w --><a class="postlink" href="http://www.webreference.com/js/tips/000903.html">www.webreference.com/js/tips/000903.html</a><!-- w --> OK with IE5.5 KO with NS7 -->
<SCRIPT LANGUAGE = "JavaScript">
<!--
function disappear(obj) {
obj.style.visibility = "hidden";
}
// -->
</SCRIPT>

</HEAD>
<BODY>
<SPAN onClick="disappear(mypar)">
Click here to remove the paragraph below:
</SPAN>
<p>
<SPAN ID="mypar">
Blah Blah Blah
</SPAN>
<p>
</body>
</HTML>
 
Back
Top