How define the maximum length in html:textarea in Struts?

J

John

Hi everybody,
I'm faced off with the maximum characters length of a Textarea using
Struts <html:textarea>.
I found a lot of suggestions about how to set a textarea to a defined
length using the simple HTML tag. But I couldn't find anything about
the <html:textarea>

Does anybody of you know how to set in struts <html:textarea> a fixed
nr. of characters? Some hints or also webpage...

Thank you very much for your help
John
 
O

Owen Jacobson

Hi everybody,
I'm faced off with the maximum characters length of a Textarea using
Struts <html:textarea>.
I found a lot of suggestions about how to set a textarea to a defined
length using the simple HTML tag. But I couldn't find anything about
the <html:textarea>

Does anybody of you know how to set in struts <html:textarea> a fixed
nr. of characters? Some hints or also webpage...

Thank you very much for your help
John

There are no attributes on the html 'textarea' element that limit the
number of characters the textarea can hold -- only on input elements
of type 'text'. See <http://www.w3.org/TR/html401/interact/
forms.html#h-17.7> for details.

You'll have to write some server-side validation to reject or truncate
submissions with too many characters. You may also (not instead) want
to add some javascript validation on the page to streamline the user
experience.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top