Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NS4 won't pick up function parameters

Status
Not open for further replies.

francesL

Programmer
Mar 15, 2003
5
GB
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)"
 
you're worried about 1% of the population?!?

doesn't sound like a thing to worry abouyt to me. _________________________________________________________
for the best results to your questions: FAQ333-2924
[sub]01001111 01101110 01110000 01101110 01110100[/sub]
onpnt2.gif
[sup] [/sub]
 
1% or whatever. All I know is that I get several emails a day from people who have got errors submitting the form and I think it's too long entries in NS4 which is the cause.

So I need a fix......
 
OK then
you'll need to rewrite the entire function
I do not believe the slice() and onKeyPress function and event are available or were available in NN4

may be wrong but I'm fairly certain nothing useful was available in NN$ _________________________________________________________
for the best results to your questions: FAQ333-2924
[sub]01001111 01101110 01110000 01101110 01110100[/sub]
onpnt2.gif
[sup] [/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top