BounceFish 

Website Solutions
Search
      home solutions clients resources faqs contact us  
  See our portfolio under the solutions section.

Resources - For Developers

Back to Resources For Developers Homepage

================COPY CODE BELOW===========================
<script language="JavaScript"><!--
function validate(what) {
if (what.length > 30) {
alert('Must be less than 30 characters');
return false;
}
return true;
}
//--></script>
<form name="formName" onSubmit="return validate(documents.formName.textName.value)">
<textarea onKeyUp="if (this.value.length>30) { alert('Please enter only 30 chars'); this.value=this.value.substring(0,30) }"></textarea>
</form>

================COPY CODE ABOVE===========================

    INSTRUCTIONS
  • Paste code inside body <BODY></BODY> of HTML page
  • Change form name and field value to suit your pre-existing form
  • Change the number 30 to whatever limit you want, just be sure to change all instances

    DESCRIPTION
  • Limits the number of characters on a text area

 

Copyright © 2003-2012. BounceFish Web Design. All rights reserved.