I have a list of check boxes. For the check boxes that are selected, I change it’s name before submitting. In FF the function works. In IE I get:
A script on this page is causing Internet Explorer to run slowly. If it
continues to run, your computer may
become unresponsive.Do you want to abort the script? YES/NO
Not sure why this loop is causing problems in IE and not FF?
function sub()
{
var x=document.getElementsByName("user");
for (i = 0; i < x.length; i++) //for all check boxes
{
if (x[i].checked == true)
{
x[i].name="id"; //change name of data so we know it is for an id
//By renaming the first element of the list, we have reduced the length of the list by one
//and deleted the first element. This is why we need to keep i at it's current position after a name change.
i=i-1;
}
}//end for
document.checks.submit();
}
This should work with a both a live and a non-live list.
Personally, though, I’d try to find some way to output the original page so that the server can figure out which elements to use, instead of relying on javascript to do it.