Mozilla 1.5: "function is not defined" JS error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dmitry

    #1

    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



  • Randy Webb

    #2
    Re: Mozilla 1.5: "functi on is not defined" JS error

    Dmitry wrote:
    [color=blue]
    > Hello,
    >
    > Sometimes on js code execution Mozilla 1.5
    > prints in JS concole the following error:
    >
    > "Error: fn is not defined"[/color]

    It says that because at the time that fn is called it is not defined.
    [color=blue]
    > 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.[/color]

    Obviously, it is not "defined" or you wouldn't get that error message.
    [color=blue]
    > 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.[/color]

    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.
    [color=blue]
    > Anyone is familar with this error/bug
    > or can confirm that the problem of this king currently exists?[/color]

    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.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly

    Comment

    • RobB

      #3
      Re: Mozilla 1.5: "functi on is not defined" JS error

      Dmitry wrote:[color=blue]
      > 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[/color]

      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...

      Comment

      • Dmitry

        #4
        Re: Mozilla 1.5: &quot;functi on is not defined&quot; JS error

        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


        Comment

        • Dmitry

          #5
          Re: Mozilla 1.5: &quot;functi on is not defined&quot; JS error

          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)


          Comment

          Working...