Menu
I’m using the following javascript to count the characters in several text areas and it works fine when you start typing. I now need it to count the characters when the page loads. I’m guessing I need something other than keyup and also not sure if this will work with the text area being populated from a database. Can anyone help? Thanks
[CODE]
$(document).ready(function() {
$(‘.countThisA’).keyup(function() {
var cs = $(this).val().length;
$(‘#countA’).val(cs);
});
$(‘.countThisB’).keyup(function() {
var cs = $(this).val().length;
$(‘#countB’).val(cs);
});
});