I have this code to produce a dynamically shrinking table according to what was typed in a textbox. On IE it works fine but on firefox the For loop doesn’t complete no matter what is in it, it goes through it once then exits. the values of trs.length are always close to 30. any ideas?? “idsl” is the id of the textbox and floopy is the id of the table.
function shrink(idsl)
{
var menuCur = document.getElementById(“floopy”);
var trs = menuCur.getElementsByTagName(“tr”);
var tr;
var td;
var myceltext;
var currenttext;
var item = document.getElementById(idsl);
for (i = 1; i < trs.length; i++)
{
tr = trs[i];
td = tr.getElementsByTagName(“td”).item(2);
myceltext=td.childNodes.item(0);
currenttext=myceltext.data;
if(currenttext.toUpperCase().indexOf(item.value.toUpperCase())==0)
{
tr.style.visibility = “visible”;
tr.style.display =”block”;
}
else
{
tr.style.visibility = “hidden”;
tr.style.display = “none”;
}
}
}