With a little mod this will work great...thanks

 -----Original Message-----
From:   Darron J. Schall [mailto:[EMAIL PROTECTED]] 
Sent:   Tuesday, September 17, 2002 2:40 PM
To:     CF-Talk
Subject:        Re: textarea

The following should be of some help to you....

function limitArea(){
   content = document.form_name.text_area_name.value;
   len = content.length;
   if (len > 500) {
      content = content.substr(0,500);
   alert('Your input is limited to 500 characters.');
   document.form_name.text_area_name.value = content;
  }
}

<textarea name="text_area_name" cols="40" rows="5"
onKeyUp="limitArea();return true;" ...>

Feel free to modify the limitArea() function to optimize it a little bit...

Happy coding,
-Darron

----- Original Message -----
From: "Nick Varner" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, September 17, 2002 4:32 PM
Subject: textarea


> Since there is not a cftextarea, how do I through up an alert in
javascript
> telling the user they have entered to many characters in a  textarea. I
know
> this is off subject but any help would be appreciated.
> 

______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to