|
Hi,
I need to do carriage return validation in a textarea when user submits tthe data(Not on keypress event).
I have written the following code
if ((field.value).indexOf(String.fromCharCode(0xD)) > -1)
{
Validation message
}
The above code works well for IE.
but this code does not work in mozilla firefox 5.1. The index is returned as -1.
Please send the fix if anybody has idea about validating carriage return in firefox.
Thanks,
Siva
|