JCHASE11
JCHASE11

Reputation: 3941

IE 7 Debug Issue - Script Error Popup

I am building a site that will not work in IE6, intentionally. IE7 Is the oldest supported IE browser for my site.

I am having a problem in IE 7 when you arrive at my site. A popup says: Script Error Line 55 Char # Error: 'cms_ims' is undefined. Then you have to press continue running scripts, yes. Anyone know whats causing this in my code? My site is www.vitaminjdesign.com. Thanks

Upvotes: 0

Views: 1202

Answers (2)

ryan
ryan

Reputation: 11

try this one:

$(window).load(function(){

    var css_cims=[];   <<< add this one
    var css_ims=[];    <<< and this one

    $.each(css_ims,function(){(new Image()).src=_siteRoot+'css/images/'+this;});

    $.each(css_cims,function(){
         var css_im=this;
         $.each(['blue','purple','pink','red','grey','green','yellow','orange'],function(){
(new Image()).src=_siteRoot+'css/'+this+'/'+css_im;
    });
    });
}); 

Upvotes: 1

harto
harto

Reputation: 90493

The variable cms_ims is not defined as either a global or local var in the executing function:

$(window).load(function(){
 $.each(css_ims,function(){(new Image()).src=_siteRoot+'css/images/'+this;});
 $.each(css_cims,function(){
  var css_im=this;
  $.each(['blue','purple','pink','red','grey','green','yellow','orange'],function(){
   (new Image()).src=_siteRoot+'css/'+this+'/'+css_im;
  });
 });
}); 

Upvotes: 0

Related Questions