Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

rotating pictures stop after one rotation


Guest

Recommended Posts

:lol: Hi there, I'm trying to add in some bits of javascript to the left column so that I have rotating photos to demonstrate how a product works. I got it loaded up and partially functioning, but it only rotates through the pictures once and then it gets stuck and the bottom menu bar keeps flashing:

Downloading picture http://ezhandsfree.com/ecommerce/catalog/undefined

 

This is the code I added in left column:

<html>

<script language="Javascript" type="text/javascript">

<!--hide script

 

adImages = new Array("images/1.jpg","images/2.jpg","images/3.jpg","images/4.jpg")

thisAd = 0

imgCt = adImages.Length

 

function rotate () {

 if (document.images) {

 thisAd++

 if (thisAd == imgCt) {

  thisAd = 0

  }

 document.adBanner.src=adImages[thisAd]

 setTimeout("rotate()",1*1000)

 }

}

 

//end hide -->

</script>

<body onLoad="rotate()">

<center>

<img src="images/1.jpg" width="120" name="adBanner" alt="Sequence">

</center>

 

 

</body>

</html>

but I just added to the bottom of the php scripting, it must no go there.

Anyone out there have some words of wisdom?

Much obliged,

Jenn

Link to comment
Share on other sites

Wouldn't it be easier to just create an annimated gif. In mozilla it doesn't work at all, or it just doesn't load fast enough on dail up, one of the two.

Steve

-------------------------

Link to comment
Share on other sites

Is your animated gif too large for 'box'?

Static images can be 'squashed' to fit.

HTH

Neil

 

Common sense is genius dressed in working clothes.

Ralph Waldo Emerson

Link to comment
Share on other sites

I didn't put it in a box though, it is just below the scripting calls for the boxes, on the column_left.php page....

Link to comment
Share on other sites

Ask and ye shall receive...

<?php

 

/*

 

$Id: column_left.php,v 1.14 2003/02/10 22:30:50 hpdl Exp $

 

 

 

osCommerce, Open Source E-Commerce Solutions

 

http://www.oscommerce.com

 

 

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

 

*/

 

 

if ( (USE_CACHE == 'true') && !defined('SID')) {

 

echo tep_cache_categories_box();

 

} else {

 

//include(DIR_WS_BOXES . 'categories.php');

 

}

 

 

 

if ( (USE_CACHE == 'true') && !defined('SID')) {

 

echo tep_cache_manufacturers_box();

 

} else {

 

//include(DIR_WS_BOXES . 'manufacturers.php');

 

}

 

 

 

//require(DIR_WS_BOXES . 'whats_new.php');

 

//require(DIR_WS_BOXES . 'search.php');

 

require(DIR_WS_BOXES . 'reviews.php');

 

require(DIR_WS_BOXES . 'information.php');

 

?>

<td><!-- ImageReady Slices (1234.psd) -->

<img src="/images/1234.gif" width="120" height="90" alt="how-to-sequence">

<!-- End ImageReady Slices --></td>

Link to comment
Share on other sites

It may be in catalog/images but your path is /images/1234.gif and the file IS NOT in there!

 

Correct the link or move it to the correct directory!

 

Thomas

 

yeah, it's in catalog/images
Link to comment
Share on other sites

Man, talk about the simple little things. I had been changing all kinds of stuff around. IT IS WORKING NOW!

 

LOVIN' this forum!

:wink:

Link to comment
Share on other sites

Now all you have to do is slow down the images. move to 70/100 second for each image. 40/100sec is too fast. :)

 

Thomas

 

Man, talk about the simple little things. I had been changing all kinds of stuff around. IT IS WORKING NOW!

 

LOVIN' this forum!

:wink:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...