I have a textarea which accepts 358 characters. I want the first 3 characters to be "***" and these should not be editable i.e. the user should start entering data after these first 3 characters. How do I do this?
i don't know if you decided to use the code i gave you before, but if you are testing the length of the textarea on an onkeypress event, you could also do something like this in that event handler: (assuming string is the value of the textarea)
if (string.indexOf("***" != 0) {
alert("You may not edit the first 3 characters of this textarea"
return false;
}
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.