it seems that maxlength="" works for <input type="text"> only.
is there anything that will do the same for <textarea>?
I am using php to error back messages longer than 1500 on my guestbook, but i assume it would be very annoying for people to have to delete what they have already written.
hey, try this one...
<textarea name="name" rows="num1" cols="num2"></textarea>
//Make sure that the product of num1 and num2 is equal to whatever
//maximum length you want...
rows and cols?
the standards say the user agent should provide ways of scrolling when the length exceeds what can be held by the textarea.
if you think about it, this makes sense.
anyways, try it for yourself, it's not gonna work.
Last edited by daimous; 12-27-2004 at 08:16 PM.
try this one for sure this will solve your problem nor answer your question...
PeOfEo, that's a very good point.
What I'm doing is use PHP to reject comments shorter than 100 chars or longer than 1500 chars.
"I'm sorry but your post has 1600 characters and the limit is 1500"
Then I take the information he entered and put it back into an identical form.
So he is faced with the form as it was when he clicked submit. No need to click the back button (because the 'back button' on IE will erase anything entered into the textarea).
The fact that users are informed that there is a 1500 limit but they do not know the length of their input (until they submit) will actually encourage them to be as succinct as possible and use a length way below this limit 'just to be sure'.
Or at least that's my logic. I'll have to see this in action for a while to make sure I'm right.
oh BTW, don't you think it would be better to keep political statements for political forums? I strongly support palestinian demands for statehood, freedom and justice yet you don't see me posting any flags or making political statements.
Its is my custom user text feild and my avatar field. In it I chose to put some of my views. Nothing is stopping you from doing the same, as long as you do not put nudity or absenities in it. Also there is a fair ammount of political discussion that goes on in the coffee lounge forum.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)