I am having a problem on a page where I have a text area that user can only
type in 8000. I provide a count of each character used as they type so they
know were they are up to. The problem is that all of a sudden the code is
counting a <space> as 3 characters and a new line as 6 characters. The
original code worked correctly under CF4.5 but seems like it is not under MX.
Here is the _javascript_ that I use:
function update() {
var old = document.f.counter.value;
document.f.counter.value=document.f.box.value.length;
if(document.f.counter.value > limit && old <= limit) {
alert('Too much data in the text box!');
if(document.styleSheets) {
document.f.counter.style.fontWeight = 'bold';
document.f.counter.style.color = '#ff0000'; } }
else if(document.f.counter.value <= limit && old > limit
&& document.styleSheets ) {
document.f.counter.style.fontWeight = 'normal';
document.f.counter.style.color = '#000000'; }
}
Has anyone had this problem before.
Thanks
Mario
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

