Use following javascript function to limit the number of characters to 255
in a textbox:
function checkLength(name)
{
var textBox = document.getElementsByName(name)[0].value;
if (textBox.length>255)
{
document.getElementsByName(name)[0].value =
textBox.substring(0,255);
}
}
And call this function on
onkeyup="checkLength('textareaName');"
onmouseout="checkLength('textareaName');"
-----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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]