"Rik" <lu************@hotmail.comwrote in message news:op.txe1pixqqnv3q9@metallium...
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.children is not a function"
Can someone help ?
<DIV id=sect style="display:block;" onclick="javascript:if
Don't use 'javascript
:' anymore..
(this.children(0).style.display=='none'){this.chil dren(0).style.display='block'}else{this.children(0 ).style.display='none'}">
Use this.childNodes[0].(etc....)
--
Rik Wasmus
=======================================
I changed the code to be:
onclick="if
(this.childNodes[0].style.display=='none'){this.childNodes[0].style.display='block'}else{this.childNodes[0].style.display='none' }"
and now this is the FF error:
"this.childNodes[0].style has no properties"
Still works in IE though.....