I have a Web page that runs properly with IE 9 with the following code:

Code:
// Check for IE
   if (isBrowserIE) tempArray[i].setAttribute("className", "red");
   else tempArray[i].setAttribute("class", "red");
I have now created a new (separate) page that uses the SAME code--I did a copy and paste of the whole function containing this code from the page that works into the new page. However, the function (this if-statement in particular) does not work in the new page--the new page does NOT make the array item red, BUT it does make it red if I change "className" to "class"--just as if IE now uses "class" like everyone else. But then the older page that still has "className" should not work, but it does!

This would seem to be an impossible scenario. Any ideas?

Thanks so much.

Ken