Welcome to Egypt Forums Mark forums read | Egypt Main Page
Egypt Forums
Arabic Movies



Web Technology Web Design Tools Photoshop,Dreamweaver,Flash,Etc.Tutorials , References , Examples.

Web Technology Thread, Add Firefox Compatibility to Existing Slideshow Script in Programming , WebDesign & Development; I've been using a concise JavaScript slideshow on my website and it functions pretty well, except that the fade transition ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=23201


Reply
LinkBack Thread Tools Display Modes
Add Firefox Compatibility to Existing Slideshow Script
 
 
Senior Member

Reply With Quote
 
Join Date: Dec 2008
Posts: 18,122
30-01-2009, 06:50 AM
 
I've been using a concise JavaScript slideshow on my website and it functions pretty well, except that the fade transition effect doesn't work in Firefox, only IE. I've tried to research this and it seems like I need to enter the following bit of...

I've been using a concise JavaScript slideshow on my website and it functions pretty well, except that the fade transition effect doesn't work in Firefox, only IE. I've tried to research this and it seems like I need to enter the following bit of script somewhere into my existing code to get it to work, but I'm pretty clueless when it comes to JavaScript and have no idea how to assimilate it into the existing slideshow script that I have. Thanks to anyone who can help!

I assume this is all I need to insert for cross-browser compatibility (correct me if I'm wrong):
Code:
function changeOpac(opacity, id) {
var object = document.getElementById(id).style;
object.opacity = (opacity / 100);
object.MozOpacity = (opacity / 100);
object.KhtmlOpacity = (opacity / 100);
object.filter = "alpha(opacity=" + opacity + ")";
}
And here's the script I want to put it into:
Code:
var slideDelay = 4500
var crossFade = 2
var Slide = new Array
("Images/Sample01.jpg","Images/Sample02.jpg","Images/Sample03.jpg","Images/Sample04.jpg","Images/Sample05.jpg","Images/Sample06.jpg");
var a
var b = 0
var c = Slide.length
var preLoad = new Array()
for (i = 0; i < c; i++){
preLoad[i] = new Image()
preLoad[i].src = Slide[i]
}
function runSlideShow(){
if (document.all){
document.images.SlideShow.style.filter="blendTrans (duration=2)"
document.images.SlideShow.style.filter="blendTrans (duration=crossFade)"
document.images.SlideShow.filters.blendTrans.Apply ()
}
document.images.SlideShow.src = preLoad[b].src
if (document.all){
document.images.SlideShow.filters.blendTrans.Play( )
}
b = b + 1
if (b > (c-1)) b=0
a = setTimeout('runSlideShow()', slideDelay)
}
 
 
 
Reply

Web Technology Thread, Add Firefox Compatibility to Existing Slideshow Script in Programming , WebDesign & Development; I've been using a concise JavaScript slideshow on my website and it functions pretty well, except that the fade transition ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=23201


Bookmarks

Tags
add, compatibility, existing, firefox, script, slideshow


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump