Topic awaiting preservation: Releasing the maxLength limit (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: USA! USA! USA! |
posted 01-25-2002 01:00
How do I reset the maxLength of a text field? i've tried setting to null, but that makes the field uneditable. ideas? |
Maniac (V) Mad Scientist From: New California |
posted 01-25-2002 05:33
<input type="text" id="time" value="0" size="3" maxlength="2"> |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 01-25-2002 06:23
Or did you want to eliminate the length restriction altogether? |
Bipolar (III) Inmate From: USA! USA! USA! |
posted 01-25-2002 17:14
I ended up just alerting the default value (which is 2147483647) and assigning it to a global definition: code: var INPUT = {maxLength: 2147483647};
|
Maniac (V) Mad Scientist From: New California |
posted 01-25-2002 22:54 |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 01-26-2002 00:10
Interesting. 2^31 - 1. Almost makes sense, but it's as if it's allowing negative numbers... oh, I know why. Cool. I believe that's the highest number allowed in JavaScript. |