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
}
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
}