|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Javascript slideshow works in IE but not Firefox
I added an image slideshow from a free javascript code website and it works fine on IE. But in Firefox it displays the first picture and does nothing else. At the top of the webpage it shows a small portion of the javascript code which is in the head (IE does not do this).
When I try to debug using Aptana, the only error states "ReferenceError: runSlideShow is not defined at onload(Event)". Here is what I have coded for the "onload" event: <body onload=runSlideShow() class="thrColAbsHdr"> I have googled helps on this and added quotes, removed quotes, removed the (), etc .... everything I could think of but nothing seems to make a difference. Here is the slideshow code which is in the head, some of which is shown at the top of the webpage in Firefox so maybe there's an error here that I'm not seeing. There is more to the code than this but for simplicity's sake, that's all I'll show here: 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) } The website I am working with is covenantbaptistdayton.org, you may view it in IE and Firefox and you will see what I am saying. Can anyone help with this? If you need more of the code, let me know. Thanks. |
|
#2
|
|||
|
|||
|
just looking over the code, it seems that you may be missing some brackets. Try putting brackets like:
j = j + 1 if (j > (p - 1)) j = 0 { t = setTimeout('runSlideShow()', slideShowSpeed) } } Looking at all the other code, anywhere there is a IF statement, it is followed by bracket, statement, endbracket. Just a thought. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Javascript slideshow works in IE but not Firefox |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|