473,381 Members | 1,435 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,381 software developers and data experts.

Mozilla 1.5: "function is not defined" JS error

Hello,

Sometimes on js code execution Mozilla 1.5
prints in JS concole the following error:

"Error: fn is not defined"

where "fn" is the function name surely defined _before_ the line
that produces error. The fn body and error line both live
in the same *.js file.

Sorry, I can not provide you with code example since
the error appears in large *.js file(~60KB) which is a closed
source and small examples do not produce this error.

Anyone is familar with this error/bug
or can confirm that the problem of this king currently exists?

Thanks, Dmitry Sychov

Jul 23 '05 #1
4 6418
Dmitry wrote:
Hello,

Sometimes on js code execution Mozilla 1.5
prints in JS concole the following error:

"Error: fn is not defined"
It says that because at the time that fn is called it is not defined.
where "fn" is the function name surely defined _before_ the line
that produces error. The fn body and error line both live
in the same *.js file.
Obviously, it is not "defined" or you wouldn't get that error message.
Sorry, I can not provide you with code example since
the error appears in large *.js file(~60KB) which is a closed
source and small examples do not produce this error.
Sorry, I can not give you more definitive answers, your explanations
suck. And "closed source" is a lame excuse. If a small example doesn't
produce the error, you keep adding code until you *do* get the error.
Then you debug it.
Anyone is familar with this error/bug
or can confirm that the problem of this king currently exists?


What bug? What error? Oh, you mean the code that you won't show so that
someone might be able to test it?

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #2
Dmitry wrote:
Hello,

Sometimes on js code execution Mozilla 1.5
prints in JS concole the following error:

"Error: fn is not defined"

where "fn" is the function name surely defined _before_ the line
that produces error. The fn body and error line both live
in the same *.js file.

Sorry, I can not provide you with code example since
the error appears in large *.js file(~60KB) which is a closed
source and small examples do not produce this error.

Anyone is familar with this error/bug
or can confirm that the problem of this king currently exists?

Thanks, Dmitry Sychov


Doesn't even matter which comes first - the declaration or the call -
as functions are compiled before any top-level statements are run
anyway, in the same <script></script> block (or imported file). Maybe
that function isn't compiling due to a syntax error. Such errors aren't
always caught by the parser. Try replacing the body of the function
with an alert to see if it's being loaded in memory; if so, examine the
original carefully...

Jul 23 '05 #3
I've loaded Mozilla 1.7 and it does not
produce this error(I assume the bug was fixed).
Firefox, also free of this.

I've noticed that the error happens before
the *.js fully loaded - of course the fn in
question is placed on top of the file.

Regards, Dmitry
Jul 23 '05 #4
Why you need an example?
Only to confirm this - but I do not need
your confirmation on this - I have my
own eyes...

Anyway, this bug dissapeares in the
latest version of Mozilla(better to name it slowzilla)
Jul 23 '05 #5

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

Similar topics

1
by: Newgene | last post by:
Hi, group, I am trying to dynamically add a method to class by following this post: ...
2
by: Peter | last post by:
Hello, First of all, sorry for all the code. I don't know how to explain my problem without it. I have a javascript function which can build a webpage dynamically. A striped down version of...
15
by: Johan | last post by:
Hi, I've been working on the following piece of code and it works fine in IE and Opera, dut keep getting the same error in Firefox. Can anyone tell me what's wrong with this code? What I'm...
5
by: Dmitriy Lapshin [C# / .NET MVP] | last post by:
Hi all, I think the VB .NET compiler should at least issue a warning when a function does not return value. C# and C++ compilers treat this situation as an error and I believe this is the right...
4
by: octavio | last post by:
Hello members of the comp.lang.c newsgroup. Please I need you help on the following one. Compiling the simple code I'm getting this error message. Why ? Please what's the correct type of the fb...
2
by: Yannick Turgeon | last post by:
Hello, I'm using A97 (french version) on XP (english version). Since this afternoon, all the Access built-in french-equivalent function are generating a "Sub or Function not defined" error. An...
42
by: Martin Jørgensen | last post by:
Hi, I'm trying to move a matlab program into c language. For those who knows matlab, this is the line I want to program in c: hx(1:nx,1:ny) = 0; % nx=10, ny=10 It works on a 2-dimensional...
3
by: KelHemp | last post by:
I have compiled data from 13 tables, one for each month of the year that hold 45 fields each, and another for employee information, that holds 16 fields. The database is intended to record hours and...
6
by: grbgooglefan | last post by:
I am creating functions, the return result of which I am using to make decisions in combined expressions. In some expressions, I would like to inverse the return result of function. E.g....
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.