hello
this is my counter
[code]
var agt=navigator.userAgent.toLowerCase();
function sz(t) {
a = t.value.split(‘n’);
b=1;
for (x=0;x < a.length; x++) {
if (a[x].length >= t.cols) b+= Math.floor(a[x].length/t.cols);
}
b+= a.length;
//if (b > t.rows && agt.indexOf(‘opera’) == -1)
if(b<5)
t.rows = b;
}
// now i make counting for total chars and total number of msgs according to the language of msg 1=unicoded 0=normal
function unicode(strText)
{
str = “”;
for (i=0; i<strText.length; i++)
if (str.indexOf(strText.charAt(i)) != -1)
return 1;
return 0;
}
unction charPlus()
{
strLen = SMSForm.message.value.length;
SMSForm.numChars.value = strLen;
if (unicode(SMSForm.message.value))
{
SMSForm.unicode1.value = 1;
numChar=SMSForm.message.value.length;
counterI=0;
if(numChar>70)
while(numChar>0)
{
numChar -=67;
counterI++;
}
else
counterI++;
SMSForm.numMsgs.value = counterI;
}
else
{
SMSForm.unicode1.value = 0;
numChar=SMSForm.message.value.length;
counterI=0;
if(numChar>160)
while(numChar>0)
{
numChar -=134;
counterI++;
}
else
counterI++;
SMSForm.numMsgs.value = counterI;
}
}
works fine with ie , opera , everything but Firefox