0

I want to add maxlength attribute to html:textarea. Im using struts1. Tried to add ,

<dynamic-attributes>true</dynamic-attributes>

But it wouldnt work. What should I do to add maxlength to html:textarea. Im using Struts1 and do not want Java script to handle this. Is their a workaround? I tried Javascript now and used onkeypress attribute which returns false if length>256. However when you copy paste something and it ignores the length and allows you to paste in definite length. Any help?

Geek
  • 3,187
  • 15
  • 70
  • 115

1 Answers1

0

The support for the maxlength attribute of textarea is HTML 5, which depends on browser support. It isn't supported by Internet Explorer 9 and below or by Opera. This chart from wufoo shows current browser support.

David Stanley
  • 333
  • 3
  • 12