PDA

View Full Version : Conveyor Belt photo problem



Jim Lavrakas
07-02-2011, 09:25 PM
1) Script Title: Conveyor Belt Slideshow script

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex14/leftrightslide.htm

3) Describe problem:
Cant find the solution to this on the script page. If I try to add more than 10 photos I get a scrolling broken icons. Works fine with 9 images or less.

Nile
07-03-2011, 03:31 AM
Try a better more customizable script: http://www.dynamicdrive.com/dynamicindex2/crawler/index.htm

jscheuer1
07-03-2011, 05:57 AM
That's a good suggestion/possibility. But broken image icons mean just that. There's most likely either a syntax error in your leftrightslide array and/or the images aren't where the code says that they are. There's virtually no limit on the number of images.

If you want more help:

Please post a link to a page on your site that contains the problematic code so we can check it out.

Jim Lavrakas
07-03-2011, 03:43 PM
Thanks for the quick response. I like this script because it is S-I-M-P-L-E (except when it doesn't work).

Here you go:

http://www.akskookumcharters.com/index-4.html

I just recoded and now I have no photos showing. DW tells me I have a syntax error on the photo links lines, but I can't figure out what the error is.

Thanks!

jscheuer1
07-04-2011, 02:51 AM
OK, there are a few things.

The array is actually OK, except it has no #11 in it:


//Specify the slider's images
var leftrightslide=new Array()
var finalslide=''
leftrightslide[0]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo01.JPG" border=0></a>'
leftrightslide[1]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo02.JPG" border=0></a>'
leftrightslide[2]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo03.JPG" border=0></a>'
leftrightslide[3]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo04.JPG" border=0></a>'
leftrightslide[4]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo05.JPG" border=0></a>'
leftrightslide[5]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo06.JPG" border=0></a>'
leftrightslide[6]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo07.JPG" border=0></a>'
leftrightslide[7]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo08.JPG" border=0></a>'
leftrightslide[8]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo09.JPG" border=0></a>'
leftrightslide[9]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo10.JPG" border=0></a>'
leftrightslide[10]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo11.JPG" border=0></a>'
leftrightslide[12]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo13.JPG" border=0></a>'
leftrightslide[13]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo14.JPG" border=0></a>'
leftrightslide[14]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo15.JPG" border=0></a>'
leftrightslide[15]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo16.JPG" border=0></a>'
leftrightslide[16]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo17.JPG" border=0></a>'
leftrightslide[17]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo18.JPG" border=0></a>'
leftrightslide[18]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo19.JPG" border=0></a>'
leftrightslide[19]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo20.JPG" border=0></a>'

That's only going to be a problem in some browsers. It's easy enough to fix. just renumber them so no numbers are skipped:


//Specify the slider's images
var leftrightslide=new Array()
var finalslide=''
leftrightslide[0]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo01.JPG" border=0></a>'
leftrightslide[1]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo02.JPG" border=0></a>'
leftrightslide[2]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo03.JPG" border=0></a>'
leftrightslide[3]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo04.JPG" border=0></a>'
leftrightslide[4]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo05.JPG" border=0></a>'
leftrightslide[5]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo06.JPG" border=0></a>'
leftrightslide[6]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo07.JPG" border=0></a>'
leftrightslide[7]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo08.JPG" border=0></a>'
leftrightslide[8]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo09.JPG" border=0></a>'
leftrightslide[9]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo10.JPG" border=0></a>'
leftrightslide[10]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo11.JPG" border=0></a>'
leftrightslide[11]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo13.JPG" border=0></a>'
leftrightslide[12]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo14.JPG" border=0></a>'
leftrightslide[13]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo15.JPG" border=0></a>'
leftrightslide[14]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo16.JPG" border=0></a>'
leftrightslide[15]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo17.JPG" border=0></a>'
leftrightslide[16]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo18.JPG" border=0></a>'
leftrightslide[17]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo19.JPG" border=0></a>'
leftrightslide[18]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo20.JPG" border=0></a>'

And you don't need all those:


<a href="http://"> . . . </a>

bits. They are there in case you want to link the images. If you have no links, get rid of them. If you do have links, replace the href="http://" parts with the actual link addresses.

The main problem though is here (from the page's source code):


<li><a href="index-2.html"><b>Feast From The Sea</b></a><a href="index-2.html" class="current"></a><a href="index-2.html"></a></li>
<li><a href="index-6.html"><b>Photo Safari</b></a></li>
<li><a href="index-3.html"><b>The Boat</b></a></li>
<li><a href="index-4.html" class="current"><b>Gallery</b></a><a href="index-4.html"></a></li>
<li><a href="index-5.html" class="last"><em><b>Fees</b></em></a></li>
</ul>
</div>
<div class="row-2"></div>
</div>
<!-- content -->
<div id="content">
<div class="inside aside-bg">
<p align="center">
<script type="text/javascript">
<script type="text/javascript">

/***********************************************
* Conveyor belt slideshow script- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/


//Specify the slider's width (in pixels)
var sliderwidth="300px"
//Specify the slider's

There should be only one opening script tag there, get rid of one of them.

Minor things -

The images are taller (350px) than the configured height of the conveyor (150px), so even if it did work, we wouldn't see all of each image. Set the conveyor to the actual height:


//Specify the slider's width (in pixels)
var sliderwidth="300px"
//Specify the slider's height
var sliderheight="350px"
//Specify the slider's slide speed (larger is faster 1-10)
var slidespeed=3
//configure background color:
slidebgcolor="#EAEAEA"

And one image:


leftrightslide[6]='<a href="http://"><img src="http://www.lavrakas.com/sc/images/gallery/photo07.JPG" border=0></a>'

is 450px high, so throws things off for the rest of them. Either resize it to 350px height or take it out of the array.

Also - you might want to set the configured width wider so that at least one full image could be seen before it starts scrolling off. You could always resize all of the images though, then you could set the conveyor's dimensions to accommodate the new images' dimensions.

Jim Lavrakas
07-05-2011, 04:45 PM
John-
Many thanks!

Jim Lavrakas
07-06-2011, 01:35 AM
John-
Not sure what's going on now after the code changes??!!

http://www.akskookumcharters.com/index-4.html

jscheuer1
07-06-2011, 02:57 AM
Looks OK. I'd cut down on the byte size of each image.

Oh, and in the akskookumcharters.com/style.css file, get rid of the highlighted line:


* {
margin:0;
padding:0;
visibility: visible;
}
html, body { height:100%;}
body { background:url(image

It's the default anyway so needn't be included. And since it's messing with (making visible) the temp div that the script uses to measure things, it should be removed.

Jim Lavrakas
07-06-2011, 07:08 AM
Looking great now. Thanks for your help!