File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Javascript: What's the Max Length of a var? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Javascript: What Watch "Javascript: What New topic
Author

Javascript: What's the Max Length of a var?

Pat Flickner
Ranch Hand

Joined: Nov 17, 2003
Posts: 173
I've just encountered something interesting that is causing me no end of headaches. I have discovered the the maximum length of my variables appears to be 999 bytes (anything longer is cut off at byte 1000). Is that normal or should I be looking for a parameter or feature that I or someone else set?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
what browser are you using?

Also some info: http://www.thescripts.com/forum/thread92088.html

Eric
Pat Flickner
Ranch Hand

Joined: Nov 17, 2003
Posts: 173
MSIE 7, but I also test in firefox. And it just occurred to me. I'm using the ancient Visual Studio InterDev Studio to debug my javascript. That could be causing a worse problem for me. Waddaya think? Thanks for the link -- that's what clued me in.
[ August 03, 2007: Message edited by: Pat Flickner ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60748
    
  65

Yes, clearly there is no real 999 limit.
[ August 03, 2007: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Javascript: What's the Max Length of a var?
 
Similar Threads
getting last piece of string
Local variable
How to find the length of the array
help me out!
Returning lenght of a string