Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with textrea

Status
Not open for further replies.

rmittal

Programmer
Joined
Aug 8, 2000
Messages
8
Location
US
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;
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top