Maxlength in TextArea

liunx

Guest
Is there the equivalent of the Maxlength attribute in a text input tag for the Textarea tag?<br />
<br />
Thanks for any help.<br />
<br />
FG<!--content-->No.<br />
<!-- m --><a class="postlink" href="http://www.w3.org/TR/html4/interact/forms.html#edef-TEXTAREA">http://www.w3.org/TR/html4/interact/for ... f-TEXTAREA</a><!-- m --><br />
<br />
But you could use eg JavaScript to trim it if it gets too long before submitting.<br />
Even better (ie always working) would be to trim it server side.<!--content-->Thanks Stefan<br />
<br />
As it is a fairly complex Database system I need to let the client know that he is running out of space. I will look into trapping the keypress event in the text area and throwing a wobbly if they go over the limit.<br />
<br />
FG<!--content-->Stefan is right. The Maxlength attribute will not work even if you try it.<!--content-->
 
Back
Top