473,324 Members | 2,370 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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

1
Hello:

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){

document.images.SlideShow.style.filter="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)
}



</script>[/HTML]


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
2 2827
firefox doesn't use filters the same way ie does....you do all your fading using ie filters....mozilla just uses the
Expand|Select|Wrap|Line Numbers
  1. myEl.style.opacity
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
gits
5,390 Expert Mod 4TB
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

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

Similar topics

1
by: Robert Skidmore | last post by:
I am building an application that will fade one panel to another panel. Both panels will have picture boxes in them (thumbnails). This is what I have tried: private void...
1
by: jase_dukerider | last post by:
Hi I have an assignment to hand in shortly for which I am after some guidance. The task is to read a WAV file, request a fade in /out time for the track from the user and the do the fade by...
14
by: David Blickstein | last post by:
I have some XML documents that I want to open in a web browser and be automatically translated to HTML via XSLT. I'm using an xml-stylesheet processing command in a file called "girml.xml". ...
2
by: Harshal | last post by:
Hello, I have following html file <html> <head> <script> var flag = true; function LoadNewImage()
4
by: Chris Lieb | last post by:
Hi, I am writing a class in JavaScript to cause a repeating fade effect. The fade class takes care of the fading and the rgb class takes care of manipulating rgb values: function rgb(red,...
1
by: Luciano A. Ferrer | last post by:
Hello! Im trying to do a few fade effects here http://relojurbano.com.ar/scalda/baseporque.php using fadomatic ( http://chimpen.com/fadomatic/ ) I dont know if fadomatic is a good solution...
2
by: hon123456 | last post by:
Dear all, I got four jpg file, I want to made them fade in / fade out continuously and repeatly in the same table cell of html (e.g. in the same <td></td>) How can I do that in javascript. Please...
6
by: Jake Barnes | last post by:
Please go look at this page using FireFox: http://www.ralphkrubner.com/Commercial/ Click the "Next" button a few times. The images fade out and then fade in. It's a nice effect. Now do try...
0
by: tristanlbailey | last post by:
I have been attempting to solve this problem for a few weeks now, but I'm not having much luck... I would like to create a seamless fading effect on each form/window in my program; one that, when...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.