473,812 Members | 2,859 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Another firefox / IE question

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
(this.children( 0).style.displa y=='none'){this .children(0).st yle.display='bl ock'}else{this. children(0).sty le.display='non e'}">
<Table>
<TR>
<TD>xxxx<TD>
</TR>
</Table>
</DIV>
Aug 21 '07 #1
2 2076
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.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
Aug 21 '07 #2

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

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

Similar topics

20
12428
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. http://www.aczoom.com/isongs/0/t_ff.html is the test page - that has shows the line "This is using CSS to specify xdvng:" show up with the default english font instead of xdvng. Internet Explorer works as expected - both CSS and FONT FACE use of
2
5714
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 mail like comcast webmail, I cannot change fonts, underline, bolden words. I cannot see the icons. I think I have the same problem using Yahoo and Firefox.
5
1831
by: Prophet | last post by:
Might be a stupid question...... but I keep seeing people post about firefox. What is firefox?
8
1134
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 needed, I'm out of luck. This seems wrong to me... BTW, I do have IE on my system, but it won't use it since Firefox is my default browser (and I have no idea how to change which browser is my default browser, so there you go). At the very...
4
5629
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 FireFox and Safari it appears as a narrow column of text with only 2-3 words per line. Here is the code: function showAll()
16
1849
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' src='sample.html' > </iframe> That prototype.js gives us goodies like $(). And sample.html looks a little
15
2279
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) web server, so this is not a cross-site scripting attack. But I would prefer not to taint the target page with any extra logic to do this. (I will if I must.) The calling page has these elements:
20
3159
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: https://bugzilla.mozilla.org/show_bug.cgi?id=201754 It seems I also can use an "external entity reference", but that depends on a DTD and I'm using XML Schema. Is it also possible with a Schema and how can I do it?
7
1334
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: self.bc_msg.scrollTop = self.bc_msg.scrollHeight; This allows the most recent text entered into the textarea to always be visible. There are issues with using 'self.bc_msg.scrollTop =
8
2137
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 www.karta-zagreba.com Tnx everyone!
0
9734
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9607
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10663
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10401
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10416
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5567
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5704
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4357
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3881
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.