PDA

View Full Version : Simple Gallery doesn't work in IE8



10eIOS
05-09-2012, 03:02 PM
1) Script Title:
Simple Controls Gallery v1.4
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex4/simplegallery.htm
3) Describe problem:

Im using the Simple Gallery javascript plugin in a website that I'm developing. The script runs perfectly in all major browsers (FF, Chrome, Safari, Opera) but it will not work IE8 or IE9. This is the website:
www.wedub4u.com/index.html

The developers tools in I9 gave the following error message:
SCRIPT5007: Unable to get value of the property '0': object is null or undefined
simplegallery.js, line 43 character 3


Any ideas in how to fix it?

Also, I'm using the same .js file in two slideshows at the same page, and I would like to have them starting at the same time, but one takes longer to load than the other due to the size of the images. Any suggestions in how to synchronize them?

jscheuer1
05-09-2012, 03:53 PM
Works OK here in IE 9, though it seems to take a long time to load the images and then takes a little extra time before starting. Consider reducing the size of the images, both their dimensions and byte size by using jpg instead of png and resizing them down a bit and optimizing each one for smallest possible byte size.

But it just doesn't work in IE 8. There's a trailing comma (red) in the imagearray:


imagearray: [
["http://wedub4u.com/images/textlogo/log1.png", "", "_new", ],
["http://wedub4u.com/images/textlogo/log2.png", "", "_new", ],
["http://wedub4u.com/images/textlogo/log3.png", "", "_new", ],
["http://wedub4u.com/images/textlogo/log4.png", "", "_new", ],
["http://wedub4u.com/images/textlogo/log1.png", "", "_new", ],
["http://wedub4u.com/images/textlogo/log2.png", "", "_new", ],
["http://wedub4u.com/images/textlogo/log3.png", "", "_new", ],
["http://wedub4u.com/images/textlogo/log4.png", "", "_new", ],
["http://wedub4u.com/images/textlogo/log1.png", "", "_new", ],
["http://wedub4u.com/images/textlogo/log2.png", "", "_new", ],
["http://wedub4u.com/images/textlogo/log3.png", "", "_new", ],
["http://wedub4u.com/images/textlogo/log4.png", "", "_new", ],
],

Get rid of it. It makes IE 8 think there's another image to follow, but since there isn't it throws an error. Other browsers error correct for that, not IE 8 and less.

The browser cache may need to be cleared and/or the page refreshed to see changes.

Note: If you were viewing the page in IE 9 in either compatibility mode or IE 8 mode, it wouldn't work at all then either because those follow IE 7 and IE 8 standards respectively.

10eIOS
05-09-2012, 04:40 PM
I got rid of the extra commas, and is still not working. I cannot reduce the size of the images, because this is a photography website and the image quality is essential. Any other suggestions to make it load faster?

Also, now I have the following error messages:


SCRIPT1009: Expected '}'
www.wedub4u.com, line 87 character 1
SCRIPT1009: Expected '}'
www.wedub4u.com, line 211 character 1


But, I don't know how to fix them. Anyone could explain me what should I do?

Have a nice day,

10eIOS

10eIOS
05-09-2012, 05:36 PM
I changed the wrong comma.

Thanks for your advice.

jscheuer1
05-09-2012, 05:44 PM
Working fine here in IE 8 and 9. Just a little slow to load. Make sure to clear the browser cache and reload the page. Go get a soda or some coffee and make a sandwhich, when you get back you will see it's working.

You can get less bytes by making the image's dimensions smaller and switching to .jpg. You don't have to step on them too much, use like 85% quality (some image editors call that 15% as in reduce quality by 15%). On the web you can't tell the difference.

But do as you like there, just be aware that the more bytes you have, the longer it takes to load.

jscheuer1
05-09-2012, 05:57 PM
Another thing I thought of you could use a different script:

http://www.dynamicdrive.com/dynamicindex14/swissarmy/index.htm

does a true incremental preload. What happens is as soon as the first two images are ready, it starts, then waits for the third before changing to the second, on so on.

And there's:

http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

It doesn't do a true incremental preload, but displays the first image as soon as it's loaded. The others load naturally as img tags, so it may or may not be a good fit for your images. It relies upon each next image loading on its own before it's needed - something that doesn't always happen.

10eIOS
05-09-2012, 06:15 PM
Thanks so much!

That plugin (Swiss army) is what I was looking for!

I'm trying it to see if I can make it work.