first of all I followed this link but it did not work
http://www.dynamicdrive.com/forums/s...ad.php?t=62400
I now have my counter working in my form.
This is what I have entered in the head.
This is what I have entered in the form. Now my ValidateForm() doesn't work on any of the other text and drop down boxes. They were coming up with an error message if they were not entered and someone tried to enter data in a box past the top one that was mandatory.Code:<SCRIPT LANGUAGE="JavaScript"> <!-- Limit the number of characters per textarea --> <!-- Begin function textCounter(field,cntfield,maxlimit) { if (field.value.length > maxlimit) // if too long...trim it! field.value = field.value.substring(0, maxlimit); // otherwise, update 'characters left' counter else cntfield.value = maxlimit - field.value.length; } // End --> </script>
Code:<form name="myForm" action="/articles/articles/javascript/dynamictextareacounter.asp?ID=<%=siteID%>" method="post" onsumbit="return validateForm()" enctype="multipart/form-data" id="myForm" >



Reply With Quote

Bookmarks