Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

"Dynamenu" conflicts withJavascript slideshow


scranson

Recommended Posts

I was using a Javascript to display images on my welcome page and it was working fine until I installed Dynamenu in a horizontal dropdown format whichworks great but the Javascript stopped working. I remove the Dynamenu the feature and the script worked fine. Can anyone help me figure out how to get them to work together. I am not a Javascript guru but understand PHP and HTML pretty well.

 

Here is the Java script I am using:

 

 

<script LANGUAGE="JavaScript">

// =======================================

// set the following variables

// =======================================

// Set slideShowSpeed (milliseconds)

var slideShowSpeed = 5000

// Duration of crossfade (seconds)

var crossFadeDuration = 3

// Specify the image files

var Pic = new Array() // don't touch this

// to add more images, just continue

// the pattern, adding to the array below

Pic[0] = 'images/IMAGE_01_web.jpg'

Pic[1] = 'images/IMAGE_02_web.jpg'

Pic[2] = 'images/IMAGE_03_web.jpg'

Pic[3] = 'images/IMAGE_04_web.jpg'

Pic[4] = 'images/IMAGE_05_web.jpg'

Pic[5] = 'images/IMAGE_06_web.jpg'

Pic[6] = 'images/IMAGE_07_web.jpg'

Pic[7] = 'images/IMAGE_08_web.jpg'

Pic[8] = 'images/IMAGE_09_web.jpg'

Pic[9] = 'images/IMAGE_10_web.jpg'

Pic[10] = 'images/IMAGE_11_web.jpg'

Pic[11] = 'images/IMAGE_12_web.jpg'

Pic[12] = 'images/IMAGE_13_web.jpg'

Pic[13] = 'images/IMAGE_14_web.jpg'

Pic[14] = 'images/IMAGE_15_web.jpg'

Pic[15] = 'images/IMAGE_16_web.jpg'

Pic[16] = 'images/IMAGE_17_web.jpg'

Pic[17] = 'images/IMAGE_18_web.jpg'

Pic[18] = 'images/IMAGE_19_web.jpg'

Pic[19] = 'images/IMAGE_20_web.jpg'

// =======================================

// do not edit anything below this line

// =======================================

var t

var j = 0

var p = Pic.length

var preLoad = new Array()

for (i = 0; i < p; i++){

preLoad = new Image()

preLoad.src = Pic

}

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>

 

This is how I get it to execute:

 

<body onLoad="runSlideShow()">

 

<div align="center"><img src="images/IMAGE_02_web.jpg" name='SlideShow' width=400 height=300></div>

 

Can anyone help me?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...