473,396 Members | 1,738 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,396 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 6421
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....
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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,...
0
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...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.