S
shobhit.mathur
Hi!
I have a form with a textarea field. I want to validate the input from
the textarea using javascript. Suppose I want to check that the user
has not entered the string:
"Hello
World!"
To do this I am using the script:
form["text"].value == "Hello\nWorld"
But this gives an "unterminated string constant error" because the
browser converts this to:
form["text"].value == "Hello
World"
So how do I do my check?
Regards,
Shobhit
I have a form with a textarea field. I want to validate the input from
the textarea using javascript. Suppose I want to check that the user
has not entered the string:
"Hello
World!"
To do this I am using the script:
form["text"].value == "Hello\nWorld"
But this gives an "unterminated string constant error" because the
browser converts this to:
form["text"].value == "Hello
World"
So how do I do my check?
Regards,
Shobhit