469,307 Members | 1,804 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,307 developers. It's quick & easy.

IE slideshow not working in Firefox

KeredDrahcir
426 256MB
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
1 1806
acoder
16,027 Expert Mod 8TB
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.

Similar topics

4 posts views Thread by sonic_soul | last post: by
87 posts views Thread by expertware | last post: by
6 posts views Thread by Mark Olbert | last post: by
9 posts views Thread by johnd126 | last post: by
9 posts views Thread by =?Utf-8?B?Sm9obiBCYWlsZXk=?= | last post: by
7 posts views Thread by Carlos Mendonça | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.