| Author |
Limit the length of textarea in struts.
|
Varsha Patil
Greenhorn
Joined: Jun 16, 2006
Posts: 19
|
|
Does anyone know how to set the maxlength for a textarea. I have a requirement where in the User should not be allowed to enter more than 1000 characters in a textarea. I tried setting maxlength=1000, but then its not working. Thanks in advance
|
 |
dongfang wang
Greenhorn
Joined: Jun 21, 2006
Posts: 1
|
|
It seems not able to set this property, also in HTML tag "textarea"
|
 |
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
|
|
|
I don't believe you can set a maximum length on a text area. One possible work-around would be to use JavaScript to check the size of the data in the text area when the fom is submitted and then issue an error message if it exceeds 1000.
|
Merrill
Consultant, Sima Solutions
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56233
|
|
"Varsha G A", There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it. In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious. Thanks! bear JavaRanch Sheriff
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Varsha Patil
Greenhorn
Joined: Jun 16, 2006
Posts: 19
|
|
I have changed the display name as per the naming policy. Thanks, Varsha
|
 |
 |
|
|
subject: Limit the length of textarea in struts.
|
|
|