Hi, Call a javascript method onKeyPressDown to validate the length. ----------------------CODE------------------ <script> function checkLength(obj,max){ if(obj.value.length>max){ alert(obj.name+" feild cannot be more than "+max); }
} </script> <BODY> /// some HTML <TEXTAREA NAME="textAreaName" onKeyDown="javascript:return checkLength(this,30)"></TEXTAREA> /// some HTML ----------------------CODE------------------ This will work like a text box maxlength property. If you want to restrict ctrl+v also , you need to call this method on corresponding key combination. Regards, Nagesh -----Original Message----- From: Abhimanyu Koul [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 3:48 PM To: Struts Mailing list Subject: textarea how can i set the maximum number of chars in a textarea. i can only set columns and rows. Regards, Abhimanyu Koul FinEng Solutions (P) Ltd. Mobile : +91 9819510090 The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]