473,624 Members | 2,584 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FireFox & JavaScript acts mysterious

I have a picture and it has onclick event, with invokes JavaScript
function called ModuleManager() ; Then it saves a copy of Node (Blocks,
which is DIV) it tmp_blocks['Blocks'] with all children elements. And
it changes Blocks innerHTML with new one, which has form and after I
press button which has onclick too and calls another function which
Blocks innerHTML sets to tmp_blocks['Blocks'];

But after that(when I want to press image again) FireFox says:
Error: ModuleManager is not a function
Source File: http://localhost/admin/
Line: 1

But, Safari, Opera, IE 7 and all other works just fine with 0 errors.
Any ideas why FireFox acts like this?

And one more thing, if I invoke function myself by writing
"javascript : ModuleManager() ;" it works perfectly.

All functions are in JS file.

Thanks for help.

Jul 8 '07 #1
5 1400
david wrote on 08 jul 2007 in comp.lang.javas cript:
I have a picture and it has onclick event, with invokes JavaScript
function called ModuleManager() ; Then it saves a copy of Node (Blocks,
which is DIV) it tmp_blocks['Blocks'] with all children elements. And
it changes Blocks innerHTML with new one, which has form and after I
press button which has onclick too and calls another function which
Blocks innerHTML sets to tmp_blocks['Blocks'];

But after that(when I want to press image again) FireFox says:
Error: ModuleManager is not a function
Source File: http://localhost/admin/
Line: 1

But, Safari, Opera, IE 7 and all other works just fine with 0 errors.
Any ideas why FireFox acts like this?

And one more thing, if I invoke function myself by writing
"javascript : ModuleManager() ;" it works perfectly.

All functions are in JS file.
Do you think we can comment on a function you did not show to us?

Did you try any form of debugging?
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 8 '07 #2
Here is those two JavaScript functions:
http://paste.uni.cc/16658

Did you try any form of debugging? <- I think - no.

Jul 8 '07 #3
I thought that the problem could be with how I change back Blocks
innerHTML, so I decided just to use replaceChild, but it didn't help
me, the same problem. So, what makes FireFox to ignore my function at
all.

Jul 8 '07 #4
david wrote:
I thought that the problem could be with how I change back Blocks
innerHTML, so I decided just to use replaceChild, but it didn't help
me, the same problem. So, what makes FireFox to ignore my function at
all.
Your problem is that you continually refrain from quoting what it is you
are replying to. Therefore, many will not even know what you are
talking about.

The newsgroup FAQ and terms of netiquette can be found here:
http://jibbering.com/faq/

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
Jul 8 '07 #5
david wrote:
But after that(when I want to press image again) FireFox says:
Error: ModuleManager is not a function
Source File: http://localhost/admin/
Line: 1

But, Safari, Opera, IE 7 and all other works just fine with 0 errors.
Any ideas why FireFox acts like this?
You have a function and an element named ModuleManager so there is
likely to be a naming conflict, I guess Firefox has the form
ModuleManager in its scope chain, not the function you are trying to
call. Call the function with
window.ModuleMa nager()
and the problem will likely go away.

That is just a guess, you need to show us where/how exactly the function
is being called and how the HTML elements are nested and how the event
handlers look.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 8 '07 #6

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

Similar topics

6
1985
by: christian9997 | last post by:
Hi I would be very helpful if someone could help me with this code. It works fine in IE but when I display it in Netscape or Firefox and I move the mouse from one menu to the other the gap between the two menus gets bigger. What is the cause of this? Thanks CODE:
13
22164
by: tochiromifune | last post by:
Hello The window.open method brings my window to the top only if it is new. If it's being reused, the window does not come to the foreground (with IE 6 it does). Is there a new way in Mozilla/Firefox that I can ensure that this window comes to the top? Thank you for your help
25
9264
by: Frances | last post by:
I have an html file, checked css syntax online (http://jigsaw.w3.org/css-validator/validator-uri.html.en) it all checks fine, got no errors or warnings.. however Firefox is not reading stylesheet, for some reason.. two examples of errors I get in JS console: Error: Unexpected end of file while searching for closing } of invalid rule set.
12
6163
by: PMA | last post by:
Hi all, I am porting a web application from IE 6.0 to FireFox 1.5. I have solved almost all compatibility issues (quite a lot but not too bad) except two of them : 1) Clipboard access thru' JavaScript (programmatical copy and paste actions) 2) Monitoring and driving Insert/Overwrite mode on input fields
2
2834
by: nick.taylor | last post by:
Hi, I've been trying for weeks to figure out this problem. I'm developing a simple Javascript app that loads an XML file from a server, parses the contents, and displays them. But I am encountering a very mysterious bug that I can't seem to get rid of. When loading the page in Internet Explorer, everything works, and in Firefox it works except for one problem: the page never stops loading. The script runs and everything parses but it...
6
4026
by: laramie.hartmann | last post by:
I have a script (see below) that accesses a XML file and displays the contents through a series of document.write calls. This all works fine in IE, but not at all in Firefox. I get no errors in the javascript console, but when I try to load the elements by tag name and look at the length it is always 0 as if no elements have been added. Any suggestions are greatly appreciated as I've been stuck on this for a while now. Thanks,
6
2030
by: smoitra | last post by:
Hi All, I am new here.I have a textbox in my form where user is supposed to enter zip codes and as soon they enter that and press tab or click elsewhere on the form it is supposed to go to javascript function called UpdateCityState which takes that textbox as object and updates City and State Values.The code is <asp:textbox id="txtZip" onkeydown="if ((event.which &amp;&amp; event.which == 13) || (event.keyCode &amp;&amp; event.keyCode == 13))...
4
4045
by: Anz | last post by:
I used the javascript functions as shown below. <a href="javascript:;;;" onclick="this.style.behavior='url(#default#homepage)'; this.setHomePage(location.href);"> But this code works for IE, not for Firefox. While running this code, the firefox shows javascript error as this.setHomePage is not a function
0
8249
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
8633
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
8348
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
7176
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6112
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4084
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
4187
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1797
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1493
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.