Yeah, I was trying this:
but your code is robably better.Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> <script type="text/javascript"> function doIt(_obj) { /* Couldnd't get this working: if (the_key_pressed_in_ascii == 8) //Backspace { return true } */ if (_obj.value.length > 15) { return false } } </script> </head> <body> <textarea onKeyPress="return doIt(this)"></textarea> </body> </html>





Reply With Quote