By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,839 Members | 1,615 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,839 IT Pros & Developers. It's quick & easy.

Fade In/Out Works in IE and not in Firefox Version 3.03.

P: 1

The following script

[HTML]// =======================================
// do not edit anything below this line
// =======================================

var t
var j = 0
var p = Pic.length

var preLoad = new Array()
for (i = 0; i < p; i++){
preLoad[i] = new Image()
preLoad[i].src = Pic[i]

function runSlideShow(){

if (document.all){"blendTrans (duration=3)"
document.images.SlideShow.filters.blendTrans.Apply ()

document.images.SlideShow.src = preLoad[j].src

if (document.all){

document.images.SlideShow.filters.blendTrans.Play( )

j = j + 1
if (j > (p-1)) j=0
t = setTimeout('runSlideShow()', speed)


Fades & switching to the next picture work fine in IE, but no Fades in Mozilla Firefox Version 3.03 just switching to next picture. Is there a way to get the fading to work also in Firefox ?

Thank You for your help in Advance
Oct 18 '08 #1
Share this Question
Share on Google+
2 Replies

P: 55
firefox doesn't use filters the same way ie do all your fading using ie filters....mozilla just uses the
Expand|Select|Wrap|Line Numbers
property, you need an else in your function after you do the fade for ie that changes the opacity for ff
Oct 18 '08 #2

Expert Mod 5K+
P: 5,389
that's right, and just two more notes on the shown code (just improvements and no real problems ;) ):

1. i strongly recommend to use a semicolon to terminate every statement correctly even when they (for the moment) are not strictly required

2. the eval like usage in the setTimeout() method is quite ugly and not required:

instead of using:

Expand|Select|Wrap|Line Numbers
  1. t = setTimeout('runSlideShow()', speed)
just use the name of the function as the reference:

Expand|Select|Wrap|Line Numbers
  1. t = setTimeout(runSlideShow, speed);
kind regards
Oct 19 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.