Not with straight HTML, but you can do it with JavaScript - something like

onKeyPress="if(document.FORMNAME.TEXTAREANAME.value.length > 500) {
alert('Only 500 characters allowed') }"

You can also do it, obviously, when the form is submitted:

<cfif Len(form.TEXTAREANAME) GT 500>
        <cfabort showerror="Only 500 characters allowed">
</CFIF>


Matt

-----Original Message-----
From: bajaria aslam [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 04, 2001 1:26 PM
To: CF-Talk
Subject: Can we limit the text in textarea


Is there a way to limit the number of characters
someone can type in in a textarea input box?

Thanks
AB
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to