Jump to content


Photo

limiting characters in textarea without php/javascript


  • Please log in to reply
3 replies to this topic

#1 mrjameer

mrjameer
  • Members
  • PipPipPip
  • Advanced Member
  • 102 posts

Posted 02 October 2006 - 11:43 PM

hi,

i want to create a textarea in which the user can input 100 characters only.he canot able to input more than 100.i want to do this with out using php/javascript.is it possible.your help will be appreciated

thanks

mrjameer

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 02 October 2006 - 11:46 PM

Not possible with textarea, but maxlength can be set for input type="text"
Legend has it that reading the manual never killed anyone.
My site

#3 mitzleah

mitzleah
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts
  • LocationManila, Philippines

Posted 03 October 2006 - 05:50 AM

You then use javascript. Here's a good source: http://javascript.in...t-textarea.html

#4 JasonLewis

JasonLewis
  • Members
  • PipPipPip
  • Advanced Member
  • 3,351 posts
  • LocationVictoria, Australia

Posted 03 October 2006 - 12:11 PM

why dont you want to use javascript? that would be the best way to go. You could just to a strlen() for your textareas $_POST var and if it is greater then the amount you want then redirect them back.
Good luck with your coding.
Jason / ProjectFear / Jaysonic




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users