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

IE slideshow not working in Firefox

KeredDrahcir
100+
P: 426
I have a script that displays a slideshow of images and each image is supposed to fade to the next image. It works in IE but in Firefox the image changes like it would in an animated GIF file.
There are some statments in there which may be what is making it only work in IE but everything I've tried to get it working in Firefox just stops it working altogether.

Can anyone tell me what I need to do to get it working in Firefox and if it wont work, where I can get a script that will.

Thanks.

<head>
Expand|Select|Wrap|Line Numbers
  1. <script language="JavaScript1.1">
  2. <!--
  3.  
  4. //*****************************************
  5. // Blending Image Slide Show Script- 
  6. //  Dynamic Drive (www.dynamicdrive.com)
  7. // For full source code, visit http://www.dynamicdrive.com/
  8. //*****************************************
  9.  
  10. //specify interval between slide (in mili seconds)
  11. var slidespeed=3000
  12.  
  13. //specify images
  14. var slideimages=new Array("image1.gif","image2.gif","image3.gif")
  15.  
  16. //specify corresponding links
  17. var slidelinks=new Array("http://www.dynamicdrive.com","http://javascriptkit.com","")
  18.  
  19. var newwindow=1 //open links in new window? 1=yes, 0=no
  20.  
  21. var imageholder=new Array()
  22. var ie=document.all
  23. for (i=0;i<slideimages.length;i++){
  24. imageholder[i]=new Image()
  25. imageholder[i].src=slideimages[i]
  26. }
  27.  
  28. function gotoshow(){
  29. if (newwindow)
  30. window.open(slidelinks[whichlink])
  31. else
  32. window.location=slidelinks[whichlink]
  33. }
  34.  
  35. //-->
  36. </script>
</head>
Expand|Select|Wrap|Line Numbers
  1. <a href="javascript:gotoshow()"><img src="image1.gif" name="slide" border=0 style="filter:blendTrans(duration=3)" width=97 height=100></a>
  2.  
  3. <script language="JavaScript1.1">
  4. <!--
  5.  
  6. var whichlink=0
  7. var whichimage=0
  8. var blenddelay=(ie)? document.images.slide.filters[0].duration*1000 : 0
  9. function slideit(){
  10. if (!document.images) return
  11. if (ie) document.images.slide.filters[0].apply()
  12. document.images.slide.src=imageholder[whichimage].src
  13. if (ie) document.images.slide.filters[0].play()
  14. whichlink=whichimage
  15. whichimage=(whichimage<slideimages.length-1)? whichimage+1 : 0
  16. setTimeout("slideit()",slidespeed+blenddelay)
  17. }
  18. slideit()
  19.  
  20. //-->
  21. </script>
  22.  
  23. <p align="center"><font face="arial" size="-2">This free script provided by<br>
  24. <a href="http://www.dynamicdrive.com">Dynamic Drive</a></font></p>
Aug 25 '11 #1
Share this Question
Share on Google+
1 Reply


acoder
Expert Mod 15k+
P: 16,027
For a script like this, it's best to start from scratch (or find another script). There's lots of fade-in scripts out there. If you want to write your own, use the opacity property (with the relevant cross-browser code).
Sep 9 '11 #2

Post your reply

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