Mozilla 1.5: "function is not defined" JS error

D

Dmitry

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
 
R

Randy Webb

Dmitry said:
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?
 
R

RobB

Dmitry said:
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...
 
D

Dmitry

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
 
D

Dmitry

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top