I'm trying to work out why i'm getting so many 404 errors in my cPanel error log. They all point to:/includes/modules/pages/product_info/jscript_textarea_counter.js
Here is the code for the current 1.3.9c js file:
PHP Code:
/* javascript function to update form field
* field form field that is being counted
* count form field that will show characters left
* maxchars maximum number of characters
*/
function characterCount(field, count, maxchars) {
var realchars = field.value.replace(/\t|\r|\n|\r\n/g,'');
var excesschars = realchars.length - maxchars;
if (excesschars > 0) {
field.value = field.value.substring(0, maxchars);
alert("Error:\n\n- You are only allowed to enter up to"+maxchars+" characters.");
} else {
count.value = maxchars - realchars.length;
}
}
Shouldn't line 10 say:
PHP Code:
field.value = field.value.substring(0, excesschars);
? I'm no code-pro, so I need confirmation on this.Cheers.
Bookmarks