Avatar of APD Toronto
APD Toronto
Flag for Canada asked on

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.

Thanks
HTMLJavaScript

Avatar of undefined
Last Comment
Dave Baldwin

8/22/2022 - Mon
Dave Baldwin

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 Toronto

ASKER
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(){
count++;
}

So, will count be alive?
ASKER CERTIFIED SOLUTION
Dave Baldwin

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
APD Toronto

ASKER
Thanks Dave!
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Dave Baldwin

You're welcome!