• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting maxsize in textareas?

 
Leandro Melo
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do i set a maxsize for text areas with Struts tags?
I looked in the documentation and there's no such tag like maxsize, maxlenght as there's one for inputs.
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a limitation of html, not Struts.

http://www.felgall.com/jstip20.htm
 
Nitin Shivaram
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can however put a Javascript check to limit the size of the textarea.
 
Tim West
Ranch Hand
Posts: 539
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For such a simple and seemingly standard task, I have found this to be very difficult. I've written a workable solution that is (I think) IE-specific, which I hate.

In any case, I'm happy to share it if people want. Does anyone have a solution they consider remotely elegant? Mine is most certainly not.


--Tim

PS we might get better answers in the HTML forum...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic