Hi,
I have this codes so that user cannot enter more than 300 characters in a text field. It was working fine in Notes 5 until we upgrade to Notes 6. I am not sure what’s wrong with it.
Here are my codes in js onload:
var fName300 = “”
var nLen300 = 0
function limitField300( f, n){
// Transfer local variables to globals
fName300 = f;
nLen300 = n;
limitLength300();
}
Function limitLength300(){
if (fName300 != “” && nLen300 > 0){
with (document.forms[0].elements[fName300]){
v = value
if (v.length > nLen300) {
value = v.substr(0,nLen300)
alert ("You can enter only upto 300 characters in this fields")
}else{
value = v
}
timerID = setTimeout(“limitLength300()”, 10000);
}
}
}
On focus of the field I have this codes:
limitField300(this.name, 300)
On Blur of field:
clearTimeout(timerID)
Thanks for any help.
Michelle