textarea validation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Neil Shaw

    #1

    textarea validation

    Hi can someone please helpme. I want to validate a textarea box. I
    dont want to just validate the no of characters entered i need to
    check how many lines have been entered. Basically i want to validate
    that only 23 lines of 40 characters are being entered.
  • Randy Webb

    #2
    Re: textarea validation

    Neil Shaw wrote:[color=blue]
    > Hi can someone please helpme. I want to validate a textarea box. I
    > dont want to just validate the no of characters entered i need to
    > check how many lines have been entered. Basically i want to validate
    > that only 23 lines of 40 characters are being entered.[/color]

    23*40 = 920. Check it's length property.

    You could conceivably count the returns, but they are different on
    different OS'es. But what happens if I don't hit the Enter key but keep
    on typing? Is that one line or multiples?

    --
    Randy
    comp.lang.javas cript FAQ - http://jibbering.com/faq

    Comment

    Working...