Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Max length of js-files?

    I have got a weird problem... It seems like my js-file, which is included in a popup, is cut off before it has been fully loaded. What could be the problem???

    The error message I'm receiving when loading the popup-window is "Row x Char y 'funct is undefined' - but there is only functIONS in my js-file!

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,253
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I guess "funct" is an abbreviation of "function"... Can you offer people a look at your script, and maybe a URL to your page(s)? Without being able to see what you have it's practically impossible to give concrete advise.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #3
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry, I will try to describe my problem better...

    Obviously the included javascript file is being cutoff when it is parsed, since the error message only says "funct is undefined" instead of "function"...! (There is no "funct" in the code! Do you think the error message has abbreviated "function"?!) Earlier I got the error "Line x character y '}' is missing" but there was no such error in the code. During my search I've come to the conclusion that the parser is stopping in the middle of the file, which also explains why it thought a bracket was missing when it was not... I guess there is a limit or something of how large one include file can be? This one has about 2200 lines and about 150 functions in it. Is that too much?

    Please, help!

  • #4
    New Coder
    Join Date
    Jul 2002
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Too much?

    Too much is not usually a problem in programming, but if it returns "funct" I'd say that your browser either ran out of cache or memory, or you put a space in accidentaly, but you might not find the space very obvious, so I (personally) suggest that you do two things:

    1) open up your *.js file and do a search for "funct", or "funct ",
    and if you find it, try loading again (after saving of course)
    2) break up your *.js file and categorize or link seperately.

    Guardian,
    Last edited by Guardian23; 07-04-2002 at 02:28 PM.

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,253
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What are you trying to accomplish with that script?!! I guess it's rather big, and am curious about load and execution times anyway! I really wouldn't know if there's a limit to how big a page can be, but it looks like you found it (the limit, that is).
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ..hmmm.. I'm curious how big the js file is...

    ..also, if it does run out of memory or gets to "some other size limit" it should error when that size is reached. Add some code in the begining of the script and see if it errors in a different place other than funct.....
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

  • #7
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank's for the answers!

    The problem disappeared when I split the file into separate include-files. It seems that the file was too large - but the question is why this happens only in some occasions? The same large include-file is included in almost all of my html-pages, but the problem only appeares in a few occasions... Perhaps it has something to do with different loading times...?

    Well, the problem is solved for now!

    /Manoo


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •