Reflection in IE

Submariner

New Member
Messages
44
Reaction score
1
Points
0
Big Joe,

Try adding the var keyword for the variable i and j in the for loop declarations as follows:

Code:
function addReflections()
{
  var rimages=document.myGetElementsByClassName('y');
  for([COLOR="Red"]var[/COLOR] i=0;i<rimages.length;i++)
  {
    var rheight=null;
    var ropacity=null;
    var classes=rimages[i].className.split(' ');
    for([COLOR="Red"]var[/COLOR] j=0;j<classes.length;j++)
    {
      if(classes[j].indexOf("rheight")==0)
      {
        var rheight=classes[j].substring(7)/100;
      }
      else if(classes[j].indexOf("ropacity")==0)
      {
        var ropacity=classes[j].substring(8)/100;
      }
    }
    Reflection.add(rimages[i],{height:rheight,opacity:ropacity});
  }
}
Hope this works, it is where the script reported an error.

James
 
Last edited:
Top