JavaScript function CountChars(CharLimit,InputID,OutputID) {
var enterchar;
var textboxvalue;
var remainingchars;
enterchar = document.getElementById(InputID).value.length;
textboxvalue = document.getElementById(InputID).value;
remainingchars = CharLimit - enterchar;
document.getElementById(OutputID).innerHTML = remainingchars + " Characters Left(max:156 Characters)";
if (remainingcharsits working partially. its calculating the remaining char but substring fun is not working in firefox.
Aman Gandhi

Sukesh MarlaRank #461 · 5.4K reputationPosted Sep 8, 2012, 7:31 AM EDT
document.getElementById(InputID).innerHTML = textboxvalue.substring(0, CharLimit);
Change it to
Check this is correct answer if it helped