• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

javascript:charecter validation

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends,
I have a requirement in javascript.
I need to validate the TExtarea charecters.In Textarea only 7 lines shoud be
allow and total charecters length is 175 and the chrecter length per line
is 25 charecters.
Please provide me code for this.

requirement like this :
1) It should allow <=175 charecters
2) Each line should contain 25 charecters
3) important this is maximum lines are 7.
i implemented this but when i type the continuasly (onkey down) control
crossing the 7 lines.
if i copy and paste more than 7 lines allowing in this cast also.

thanks & Regards
chennarao

[Bear edit: removed 'urgent' from subject]
[ August 26, 2005: Message edited by: Bear Bibeault ]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
People here are not going to just write code for you. If you post what you have so far, and describe where you stuck, folks will be glad to help you get to the finish line.
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can try an approach of having 7 input type="text" fields one over another, so you can set maxlength on each.

It may not be pretty, but it's easier than trying to enforce your requirements on a textarea.
 
reply
    Bookmark Topic Watch Topic
  • New Topic