Maximum characters in input value

Hi Experts

Does the value property of an input control (select option, in specific), have an maximum allowed characters?

I want to store in the value property a long string of Values that I nee in my js..  I can use hidden fields, but I want to avoid clutter.

APD TorontoAsked:
Who is Participating?
Dave BaldwinFixer of ProblemsCommented:
'Alive' is an odd term to me.  Javascript variables are available at all times after a page is loaded.  Your example with 'count' should work fine.  Loading order can be important in that you can't use a function or a variable before it is declared.  That's true in all the languages I know about.

I have pages where the javascript variable values change depending things like buttons on the page.  They also get re-written when a form submit is done thru the validation routines.
Dave BaldwinFixer of ProblemsCommented:
I don't know of any character limit.  If it's not going to be user input, why not just put it in a javascript variable?
APD TorontoAuthor Commented:
Is there a way to keep a JS variable "alive" during the entire time the page is loaded.

Simple example:

var count = 0;

Then you have an input button with onClick="increaseCount();"

function increaseCount(){

So, will count be alive?
APD TorontoAuthor Commented:
Thanks Dave!
Dave BaldwinFixer of ProblemsCommented:
You're welcome!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.