Script Categories

Forms >>> Max Entry.

Make sure your visitor doesn't exceed the maximum number of characters that you want to accept in a form. Short too!

Please type 15 characters or less.

Add the below code to the <body> section of your page:

<script language="javascript" type="text/javascript">
/* Visit for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
function checkchars(form) {
var max=15;
if (form.chars.value.length > max) {
alert("Please do not enter more than 15 characters.  Please shorten your entry and submit again.");
return false;
else return true;
function Count(forM)
    var count = forM.chars.value.length;
// End -->
<form onsubmit="return checkchars(this)">
Please type 15 characters or less.<br>
<textarea rows=5 cols=30 name=chars wrap=virtual  onKeyUp="Count(this.form)"></textarea>
<br><input type=submit value="Submit!">
<span id="CharsCount"></span>

JavaScript Editor Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.

Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).