Does anybody have any idea why this function won't pick up the second parameter - called 'allowedL' - passed from a form field in Netscape 4? Everything works in IE and NS6.
The function is:
function CheckLength(theInput, allowedL){
if(theInput.value.length > allowedL){
var shorterInput = theInput.value.slice(0,(theInput.value.length-1))
theInput.value = shorterInput;
return false;
}
}
The function is called from text inputs and text areas like this:
onKeyPress="CheckLength(this,25)"
The function is:
function CheckLength(theInput, allowedL){
if(theInput.value.length > allowedL){
var shorterInput = theInput.value.slice(0,(theInput.value.length-1))
theInput.value = shorterInput;
return false;
}
}
The function is called from text inputs and text areas like this:
onKeyPress="CheckLength(this,25)"