blob: 3a1ebdbc53b4f7c4bcea20317f6dc65f404c6222 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// I need to move this into a JS folder for the plugin
/*
<!-- Dynamic Version by: Nannette Thacker -->
<!-- http://www.shiningstar.net -->
<!-- Original by : Ronnie T. Moore -->
<!-- Web Site: The JavaScript Source -->
<!-- Limit the number of characters per textarea -->
*/
function textCounter(field,cntfield,maxlimit) {
// if too long...trim it!
if (field.value.length > maxlimit) {
field.value = field.value.substring(0, maxlimit);
} else {
// otherwise, update 'characters left' counter
cntfield.value = maxlimit - field.value.length;
}
}
|