473,320 Members | 1,695 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Another firefox / IE question

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
(this.children(0).style.display=='none'){this.chil dren(0).style.display='block'}else{this.children(0 ).style.display='none'}">
<Table>
<TR>
<TD>xxxx<TD>
</TR>
</Table>
</DIV>
Aug 21 '07 #1
2 2048
Rik
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
Aug 21 '07 #2

"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.....
Aug 21 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: B Wooster | last post by:
There is a page that shows Firefox 1.0 render text differently for CSS as compared to FONT FACE for one particular font: http://www.aczoom.com/fonts/xdvng.ttf is the font that does not work. ...
2
by: anna | last post by:
Firefox Mozilla Browser Fonts / Format / rich text / webmail question I have Comcast. They do not support Firefox so they won't help me. When I use Mozilla firefox browser to access my web...
5
by: Prophet | last post by:
Might be a stupid question...... but I keep seeing people post about firefox. What is firefox?
8
by: Peter Oliphant | last post by:
I use Firefox as my browser. As a result, I'm banned from getting Windows Updates. This seems a bit monopolistic on MS's part, and it means if there is a security problem or a VS C++.NET 2005 patch...
4
by: drew197 | last post by:
I am a newbie. I am editing someone elses code to make it compatible with Firefox and Safari. In IE, when you click on the proper link, a block of text is shown in a nice paragraph form. But, in...
16
by: Phlip | last post by:
Javascripters: I have a page with an iframe inside. Let's say the iframe looks like this: <script src="/javascripts/prototype.js" type="text/javascript" /> .... <iframe id='grinder'...
15
by: Phlip | last post by:
Javascripters: I have an outer page and an inner iframe. The outer page calculates some javascript, and wants the inner frame to run it. The inner frame should hit a page on the same (private)...
20
by: Johan | last post by:
How can I include one XML file into another XML file (on the client side, in Firefox)? I think XInclude is just what I need, but Firefox doesn't support it:...
7
by: jackwootton | last post by:
Hello, I have a textarea (a very small one). I register a keydown event listener on the textarea. In the function which handles the event, I have the following line of code: ...
8
by: Jomba | last post by:
Hi everyone, In folder image i have 24 pictures, and i would like to have some javascript that will every hour put another picture as background image. I would like to do that on this page...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.