Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-07-2012, 08:55 PM   PM User | #1
dubsdj
New to the CF scene

 
Join Date: Oct 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
dubsdj is an unknown quantity at this point
Unhappy IE10 document.images.SlideShow not working anymore

Hi to my dismay IE10 has broken my website slideshow It works with every other browser on the planet except IE10 Is IE10 picking out a coding error ? Does anybody know what I can change to make it work again?

thanks



<script>
var slideShowSpeed = 3000
var crossFadeDuration = 39
var Pictures = new Array()

Pictures[0] = 'Images/Slideshow/2.jpg'
Pictures[1] = 'Images/Slideshow/3.jpg'
Pictures[2] = 'Images/Slideshow/4.jpg'
Pictures[3] = 'Images/Slideshow/5.jpg'
Pictures[4] = 'Images/Slideshow/6.jpg'
Pictures[5] = 'Images/Slideshow/7.jpg'
Pictures[6] = 'Images/Slideshow/8.jpg'
Pictures[7] = 'Images/Slideshow/9.jpg'
Pictures[8] = 'Images/Slideshow/10.jpg'



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

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

function runSlideShow(){
if (document.all){
document.images.SlideShow.style.filter="blendTrans(duration=2)"
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
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()', slideShowSpeed)
}
</script>
dubsdj is offline   Reply With Quote
Old 10-07-2012, 09:21 PM   PM User | #2
dubsdj
New to the CF scene

 
Join Date: Oct 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
dubsdj is an unknown quantity at this point
Just to say the actual problem with IE10 is now the slide show will not progress to the next slide...
dubsdj is offline   Reply With Quote
Old 10-07-2012, 09:48 PM   PM User | #3
Logic Ali
Regular Coder

 
Logic Ali's Avatar
 
Join Date: Sep 2010
Location: London
Posts: 959
Thanks: 0
Thanked 198 Times in 193 Posts
Logic Ali will become famous soon enoughLogic Ali will become famous soon enough
Looks like some trash from Dynamicdive.

Try a global search and replace:

document.images.SlideShow

to

document.getElementById( "SlideShow" )

For this to work your <img> tag needs id="SlideShow"

If not, check the error console.
Logic Ali is offline   Reply With Quote
Old 10-07-2012, 10:05 PM   PM User | #4
dubsdj
New to the CF scene

 
Join Date: Oct 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
dubsdj is an unknown quantity at this point
Quote:
Originally Posted by Logic Ali View Post
Looks like some trash from Dynamicdive.

Try a global search and replace:

document.images.SlideShow

to

document.getElementById( "SlideShow" )

For this to work your <img> tag needs id="SlideShow"

If not, check the error console.

It is, but the fact it works (worked) is all I really am bothered about. I will try your suggestion and let you know if it makes a difference thanks.
dubsdj is offline   Reply With Quote
Old 10-07-2012, 10:12 PM   PM User | #5
dubsdj
New to the CF scene

 
Join Date: Oct 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
dubsdj is an unknown quantity at this point
Your alteration made no difference. I checked the error console and found the following:

SCRIPT5007: Unable to get property 'blendTrans' of undefined or null reference
index.html, line 54 character 7

Last edited by dubsdj; 10-07-2012 at 10:15 PM..
dubsdj is offline   Reply With Quote
Old 10-07-2012, 10:20 PM   PM User | #6
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,447
Thanks: 0
Thanked 496 Times in 488 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
Your code is trying to use proprietary filters that only earlier versions of IE supported.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Old 10-07-2012, 10:24 PM   PM User | #7
dubsdj
New to the CF scene

 
Join Date: Oct 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
dubsdj is an unknown quantity at this point
Quote:
Originally Posted by felgall View Post
Your code is trying to use proprietary filters that only earlier versions of IE supported.
I know the blendtrans don't work on safari, firefox etc , however the slideshow still runs ok... so I was just wanting the slides to still move forward. Is that simply impossible with IE10 do you think using this script? Or is there an alteration I could use to possibly get it working again?
dubsdj is offline   Reply With Quote
Old 10-07-2012, 11:02 PM   PM User | #8
Logic Ali
Regular Coder

 
Logic Ali's Avatar
 
Join Date: Sep 2010
Location: London
Posts: 959
Thanks: 0
Thanked 198 Times in 193 Posts
Logic Ali will become famous soon enoughLogic Ali will become famous soon enough
Quote:
Originally Posted by dubsdj View Post
Your alteration made no difference. I checked the error console and found the following:

SCRIPT5007: Unable to get property 'blendTrans' of undefined or null reference
index.html, line 54 character 7
Just delete both
Code:
if( docment.all )
{
...
}
blocks.
Logic Ali is offline   Reply With Quote
Old 10-07-2012, 11:54 PM   PM User | #9
dubsdj
New to the CF scene

 
Join Date: Oct 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
dubsdj is an unknown quantity at this point
Quote:
Originally Posted by Logic Ali View Post
Just delete both
Code:
if( docment.all )
{
...
}
blocks.
Tried that, slideshow just sits there and doesn't progress to next image.
dubsdj is offline   Reply With Quote
Old 10-08-2012, 12:06 AM   PM User | #10
dubsdj
New to the CF scene

 
Join Date: Oct 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
dubsdj is an unknown quantity at this point
I have implemented a CSS slideshow which works except one really difficult problem to solve.

my css dropdown menus are disappearing behind the slideshow image! Is there a way to say that the drop down menu is always on top?

thanks
dubsdj is offline   Reply With Quote
Old 10-08-2012, 12:09 AM   PM User | #11
dubsdj
New to the CF scene

 
Join Date: Oct 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
dubsdj is an unknown quantity at this point
Just added: z-index:12000 to the dropdown CSS rule. works! Now a case of changing all of my pages :/
dubsdj is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 07:27 PM.


Advertisement
Log in to turn off these ads.