PDA

View Full Version : simplegallery 1.4 and IE 8 dont work



cmorenos
11-18-2011, 02:01 AM
1) Script Title: simple controls gallery 1.4

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/simplegallery.htm

3) Describe problem:hi! I`m designing my web page with HTML kit, my problem is that when i preview with IE8 the gallery looks and works great, but when i got to another of my pages and come back to the picture page the ajaxload.gif stays on forever and the pictures never show. this only happens within the same session, no problem with FF or any other.Please help!


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<link rel="shortcut icon" href="images/hands.ico" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>**Namasté** Fotos</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<!-- Navbar def -->
<script language="JavaScript" type="text/javascript">

if (document.images) {
tabla_b1_off = new Image(); tabla_b1_off.src = "images/tabla_b1.gif"
tabla_b1_over = new Image(); tabla_b1_over.src = "images/tabla_b1_over.gif"
tabla_b2_off = new Image(); tabla_b2_off.src = "images/tabla_b2.gif"
tabla_b2_over = new Image(); tabla_b2_over.src = "images/tabla_b2_over.gif"
tabla_b3_off = new Image(); tabla_b3_off.src = "images/tabla_b3.gif"
tabla_b3_over = new Image(); tabla_b3_over.src = "images/tabla_b3_over.gif"
tabla_b4_off = new Image(); tabla_b4_off.src = "images/tabla_b4.gif"
tabla_b4_over = new Image(); tabla_b4_over.src = "images/tabla_b4_over.gif"
tabla_b5_off = new Image(); tabla_b5_off.src = "images/tabla_b5.gif"
tabla_b5_over = new Image(); tabla_b5_over.src = "images/tabla_b5_over.gif"
}

function turn_off(ImageName) {
if (document.images != null) {
document[ImageName].src = eval(ImageName + "_off.src");
}
}

function turn_over(ImageName) {
if (document.images != null) {
document[ImageName].src = eval(ImageName + "_over.src");
}
}
</script>
<script type="text/javascript" src="jquery.min.js"></script>

<style type="text/css"></style>

<script type="text/javascript" src="simplegallery.js">

/***********************************************
* Simple Controls Gallery- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/

</script>

<script type="text/javascript">

var mygallery=new simpleGallery({
wrapperid: "simplegallery1", //ID of main gallery container,
dimensions: [400, 300], //width/height of gallery in pixels. Should reflect dimensions of the images exactly
imagearray: [
["http://i26.tinypic.com/11l7ls0.jpg", "http://en.wikipedia.org/wiki/Swimming_pool", "_new", "There's nothing like a nice swim in the Summer."],
["http://i29.tinypic.com/xp3hns.jpg", "http://en.wikipedia.org/wiki/Cave", "", ""],
["http://i30.tinypic.com/531q3n.jpg", "", "", "Eat your fruits, it's good for you!"],
["http://i31.tinypic.com/119w28m.jpg", "", "", ""]
],
autoplay: [true, 2500, 2], //[auto_play_boolean, delay_btw_slide_millisec, cycles_before_stopping_int]
persist: true, //remember last viewed slide and recall within same session?
fadeduration: 500, //transition duration (milliseconds)
oninit:function(){ //event that fires when gallery has initialized/ ready to run
//Keyword "this": references current gallery instance (ie: try this.navigate("play/pause"))
},
onslide:function(curslide, i){ //event that fires after each slide is shown
//Keyword "this": references current gallery instance
//curslide: returns DOM reference to current slide's DIV (ie: try alert(curslide.innerHTML)
//i: integer reflecting current image within collection being shown (0=1st image, 1=2nd etc)
}
})

</script>
</head>

ddadmin
11-18-2011, 04:10 PM
Please post a link to the page on your site that contains the problematic script so we can check it out.

cmorenos
11-18-2011, 06:25 PM
sorry!
www.carlosmoreno.comocreartuweb.es

ddadmin
11-19-2011, 02:53 PM
I don't see Simple Gallery (or any script) on that page actually.

cmorenos
11-22-2011, 02:05 AM
sorry, it`s actually on this page:
http://www.carlosmoreno.comocreartuweb.es/fotos.html

cmorenos
11-27-2011, 08:08 PM
it works well on firefox, safari and google chrome but not IE8

samcap
02-01-2012, 03:46 PM
I am having the exact same problem in IE7 and IE8. Did someone find a fix for this?

Thanks

jscheuer1
02-02-2012, 01:55 AM
Using a text only editor like NotePad, find this section in the simplegallery.js file:


for (var i=0; i<setting.imagearray.length; i++){ //preload slideshow images
preloadimages[i]=new Image()
preloadimages[i].src=setting.imagearray[i][0]
if (setting.imagearray[i][3] && setting.imagearray[i][3].length>setting.longestdesc.length)
setting.longestdesc=setting.imagearray[i][3]
jQuery(preloadimages[i]).bind('load error', function(){
loadedimages++
if (loadedimages==setting.imagearray.length){
dfd.resolve() //indicate all images have been loaded
}
})
}

Replace it with this:


for (var i=0; i<setting.imagearray.length; i++){ //preload slideshow images
preloadimages[i]=new Image()
if (setting.imagearray[i][3] && setting.imagearray[i][3].length>setting.longestdesc.length)
setting.longestdesc=setting.imagearray[i][3]
jQuery(preloadimages[i]).bind('load error', function(){
loadedimages++
if (loadedimages==setting.imagearray.length){
dfd.resolve() //indicate all images have been loaded
}
})
preloadimages[i].src=setting.imagearray[i][0]
}

samcap
02-02-2012, 02:47 PM
You are a lifesaver! Thanks a lot!