By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,496 Members | 1,528 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,496 IT Pros & Developers. It's quick & easy.

Mozilla 1.5: "function is not defined" JS error

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.