During form validation (ie before submitting form), how can I check if a text area contains any text?

thomas dietrich

You can check the number of charactors enterd by checking the value.length property.

example:

if(document.forms[0].textareaname.value.length == 0){
  don't submit
}else{
  submit this bad boy
}
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact