i use the following script (from textbook) to restrict 160 character in
Message_cont textbox.
how can i to change the number of character to 70 if any double bytes
character detected in the textbox. Thanks a lot.
tony
*********************************
var text1;
function checklength()
{
var txt;
txt=document.formsend.Message_cont.value;
n=txt.length;
if (n>160)
{
document.formsend.Message_cont.value=text1;
return;
}
text1=document.formsend.Message_cont.value;
}
*************detect double byte character****************
( /[\u0100-\uffff]/.test( document.formsend.Message_cont.value ) )