Welcome to WebmasterWorld Guest from 34.238.189.171

Forum Moderators: open

Message Too Old, No Replies

slideshow loader gif only shows up on first image in ie .6. 7 and 8

     
7:57 am on Nov 9, 2011 (gmt 0)

New User

5+ Year Member

joined:Nov 9, 2011
posts:4
votes: 0


I am using a slideshow, I dont know javascript however do understand something, and been researching trying to find a bug (a hack) as the slideshow have a loading image that shows up while the images load.
Its works perfect in firefox, chrome, safari and ie 9, however in ie6, 7 and 8 the loading image only shows up on the first image, if you go to next image there are no loading image, its only blank.
It uses the mootols library, and I have the version without loading image and the version with loading image, so I pass the code here which as per me is what its about the loading image, if somebody knows of a known bug in ie6, ie7 and ie8. There are many using ie8 so this is important to me, thanks.
I know there must be more code that have to do with the loader image, however maybe the bug is here.
Any help would be appreciated. Thanks in advance.

loadedPictures : {},
loaderGif : 'images/ajax-loader.gif',

initialize : function(config) {
if(config.listeners) {
this.addEvents( config.listeners);
}

if(config.preload !== undefined){
this.preload = config.preload;
if(config.loaderGif !== undefined){
this.loaderGif = config.loaderGif;
}
}
if(config.autoplay !== undefined) {
if (config.autoplay.enabled !== undefined) {
this.autoplay.enabled = config.autoplay.enabled;
}
if(config.autoplay.pause){
this.autoplay.pause = config.autoplay.pause;
}
if(config.autoplay.buttons) {
if(config.autoplay.buttons.start){
if(config.autoplay.buttons.start.txt){
this.autoplay.buttons.start.txt = config.autoplay.buttons.start.txt;
}
if(config.autoplay.buttons.start.enabled !== undefined){
this.autoplay.buttons.start.enabled = config.autoplay.buttons.start.enabled;
}
if(config.autoplay.buttons.stop.txt){
this.autoplay.buttons.stop.txt = config.autoplay.buttons.stop.txt;
}
if(config.autoplay.buttons.stop.enabled !== undefined){
this.autoplay.buttons.stop.enabled = config.autoplay.buttons.stop.enabled;
}
}

}
}
More:
getLargeImagePath : function(id) {
if(!this.loadedPictures[id] && this.loaderGif){
this.dom.loaderImages = this.dom.loaderImages || {};
var loader = this.dom.loaderImages[id] = new Element('img');
loader.addEvent('load', function(){
this.setStyles({
width: this.getSize().x,
height : this.getSize().y,
'margin-left' : this.getSize().x /2 * -1,
'margin-top' : this.getSize().y /2 * -1
})
});
loader.setStyles({
position : 'absolute',
left : '50%',
top : '50%',
'margin-left': '-110px',
'margin-top': '-10px'
});
loader.setProperty('src', this.loaderGif);