Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-04-2002, 12:20 PM   PM User | #1
Manoo
New to the CF scene

 
Join Date: Jul 2002
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Manoo is an unknown quantity at this point
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!
Manoo is offline   Reply With Quote
Old 07-04-2002, 01:45 PM   PM User | #2
ronaldb66
Senior Coder

 
Join Date: Jun 2002
Location: The Netherlands, Baarn, Ut.
Posts: 4,253
Thanks: 0
Thanked 0 Times in 0 Posts
ronaldb66 is an unknown quantity at this point
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
ronaldb66 is offline   Reply With Quote
Old 07-04-2002, 02:14 PM   PM User | #3
Manoo
New to the CF scene

 
Join Date: Jul 2002
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Manoo is an unknown quantity at this point
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!
Manoo is offline   Reply With Quote
Old 07-04-2002, 02:26 PM   PM User | #4
Guardian23
New Coder

 
Join Date: Jul 2002
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Guardian23 is an unknown quantity at this point
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..
Guardian23 is offline   Reply With Quote
Old 07-04-2002, 02:28 PM   PM User | #5
ronaldb66
Senior Coder

 
Join Date: Jun 2002
Location: The Netherlands, Baarn, Ut.
Posts: 4,253
Thanks: 0
Thanked 0 Times in 0 Posts
ronaldb66 is an unknown quantity at this point
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
ronaldb66 is offline   Reply With Quote
Old 07-04-2002, 03:21 PM   PM User | #6
Vladdy
Senior Coder

 
Join Date: Jun 2002
Location: Nashua, NH
Posts: 1,724
Thanks: 0
Thanked 0 Times in 0 Posts
Vladdy is an unknown quantity at this point
..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"
Vladdy is offline   Reply With Quote
Old 07-08-2002, 11:38 AM   PM User | #7
Manoo
New to the CF scene

 
Join Date: Jul 2002
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Manoo is an unknown quantity at this point
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
Manoo is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:50 AM.


Advertisement
Log in to turn off these ads.