PDA

View Full Version : Ultimate Fade-in slideshow (v1.51)



wishingangels
10-16-2007, 03:33 AM
1) Script Title: Ultimate Fade-in slideshow (v1.51)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

3) Describe problem: The script looks fab on FF but it looks like as if its hidden in IE6, your help would be greatly appreciated.

I'm quite new to this forum so please be patient :)

I'm using Cubecart e-commerce cart for my web-design :)

Cheers
WA http://www.flairconcepts.com

jscheuer1
10-16-2007, 04:38 AM
Your page is in violation of Dynamic Drive's usage terms (http://www.dynamicdrive.com/notice.htm), which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.

There are two problems I see here:


<br clear="all" />
<div>
<script>
//new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
new fadeshow(fadeimages, 600, 225, 0, 3000, 1, "R")
new fadeshow(fadeimages2, 140, 225, 0, 3000, 0)
</script>
</div>

The first is meaningless. The second is referring to an array of images that doesn't exist, try it like this:


<br style="clear:both" />
<div>
<script>
//new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
new fadeshow(fadeimages, 600, 225, 0, 3000, 1, "R")
</script>
</div>

In the first case, I am assuming the clear:both; style property/value pair is what you are intending. If I am right about that, lack of clearing previous floats could be part of the problem. In the second case, since you are only using one show, and only have one configured in your external script, keeping that code there will only cause an error at best, and might be the problem or a part of the problem in IE.

There could be other problems.

wishingangels
10-18-2007, 10:21 AM
Thank-you for taking time in pointing those things out.

I have made the changes as per what you have here but still cannot see it in IE6 but it works in FF.

Is there some type of code in the JS itself i could change to make sure that it shows up?

I'm quite new to all of this so simple steps would help :)

Thank-you.

Regards,
WA
Your page is in violation of Dynamic Drive's usage terms (http://www.dynamicdrive.com/notice.htm), which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.

There are two problems I see here:


<br clear="all" />
<div>
<script>
//new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
new fadeshow(fadeimages, 600, 225, 0, 3000, 1, "R")
new fadeshow(fadeimages2, 140, 225, 0, 3000, 0)
</script>
</div>

The first is meaningless. The second is referring to an array of images that doesn't exist, try it like this:


<br style="clear:both" />
<div>
<script>
//new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
new fadeshow(fadeimages, 600, 225, 0, 3000, 1, "R")
</script>
</div>

In the first case, I am assuming the clear:both; style property/value pair is what you are intending. If I am right about that, lack of clearing previous floats could be part of the problem. In the second case, since you are only using one show, and only have one configured in your external script, keeping that code there will only cause an error at best, and might be the problem or a part of the problem in IE.

There could be other problems.

jscheuer1
10-18-2007, 11:16 AM
I have made the changes as per what you have here but still cannot see it in IE6 but it works in FF.

No you haven't, at least not on your live page. I figured out the problem. But first, please reinstate the credit notice on the page.

The problem is that you have an element with id="p", and the script uses p as a global variable. It really shouldn't and doesn't need to. Add this (red):



. . .
////NO need to edit beyond here/////////////

var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers

var dom=(document.getElementById) //modern dom browsers
var iebrowser=document.all

function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (var p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}

var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
. . .