[thelist] Re: Text area question

Tanner Burson tanner at younet.okstate.edu
Mon Mar 15 10:39:55 CST 2004


*This message was transferred with a trial version of CommuniGate(tm) Pro*
John.Brooking at sappi.com wrote:

>*This message was transferred with a trial version of CommuniGate(tm) Pro*
>  
>
>>>From: thelist-bounces at lists.evolt.org 
>>>Sent: Sunday, March 14, 2004 10:46 AM
>>>To: thelist at lists.evolt.org
>>>Subject: [thelist] Text area question
>>>
>>>
>>>Is there any way to limit the number of characters in a 
>>><textarea></textarea> field?
>>>      
>>>
>>But, yes, write me off line and I'll send you a ZIP file of a method I
>>created (with lots of help from folks here) that does just that.
>>    
>>
>
>I haven't tried this, but couldn't you just add an onKeyPress (?) event to
>check the current length and return false from the event if the limit has
>been reached? Or something like that?
>
>- John
>
>  
>
Well you could use the onKeyPress to check the length, but you couldn't 
preven the keypress from occuring (I don't believe), so you'd actually 
end up having to delete the last character each time.  Which is by no 
means impossible, or even that big of a challenge, but I am curious as 
to what the solution in this zip file is, if it is different than this.

Tanner



More information about the thelist mailing list