"Rik" <lu************ @hotmail.comwro te in message news:op.txe1pix qqnv3q9@metalli um...
On Tue, 21 Aug 2007 17:34:00 +0200, Jon Paal [MSMD] <Jon nospam Paal
everywhere dot com wrote:
This "show-hide" works in IE7 but fails in FF2 -
Error in FF: "this.child ren is not a function"
Can someone help ?
<DIV id=sect style="display: block;" onclick="javasc ript:if
Don't use 'javascript
:' anymore..
(this.children( 0).style.displa y=='none'){this .children(0).st yle.display='bl ock'}else{this. children(0).sty le.display='non e'}">
Use this.childNodes[0].(etc....)
--
Rik Wasmus
=============== =============== =========
I changed the code to be:
onclick="if
(this.childNode s[0].style.display= ='none'){this.c hildNodes[0].style.display= 'block'}else{th is.childNodes[0].style.display= 'none' }"
and now this is the FF error:
"this.childNode s[0].style has no properties"
Still works in IE though.....