Click to See Complete Forum and Search --> : Firefox compatibility issues - code help required.


amstel78
01-03-2006, 11:26 AM
Dear all,

I'm having a problem with a certain portion of my JS code. The function of this code is to check what a user has input into a text box. If the input matches what is listed on a table, the code continues by transferring focus to the next input table. If not, it returns an error code to the user stating that input is not recognized. This works perfectly in IE, however it will go into a loop when used in Firefox. Is there something I can change here that Firefox will recognize?

function isListElement(myElement, myList){
response = false;
i=0;
while(i<myList.length){
if(myList[i] == myElement){
response = true;
break;
}
i ++;
}
return response
}

felgall
01-03-2006, 03:14 PM
I suspect that the problem is that either myElement or myList is not being passed properly from the form. IE is probably working because JScript maps lots of fields onto multiple names whereas Javascript doesn't.