vineet
01-06-2009, 10:39 AM
hi
i need to count the number of words in the text area. if exceeds then give alert.
i m using this validation but this counts the characters not words
<script language="javascript">
function alerty()
{
if(document.myform.w.value.length>5)
{
alert("words limit exceeded");
return false;
}
}
</script>
<textarea rows="15" name="w" cols="45"></textarea>
vineet
i need to count the number of words in the text area. if exceeds then give alert.
i m using this validation but this counts the characters not words
<script language="javascript">
function alerty()
{
if(document.myform.w.value.length>5)
{
alert("words limit exceeded");
return false;
}
}
</script>
<textarea rows="15" name="w" cols="45"></textarea>
vineet