views:

320

answers:

2

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

A: 

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;
  });
 });
});
harto
so what would I do? Delete it?
JCHASE11
I did delete it, and it worked. You pointed it out so thanks!
JCHASE11
Probably try to fix it, but I'm guessing you didn't write it. It looks like some kind of image preloader for a theme switcher or something.
harto
yea i take that bac,, it didnt work.... i did not write that, it came with the jquery image slider plugin im using. More of a pain than anything
JCHASE11
A: 

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; }); }); });

ryan