PDA

View Full Version : conveyor belt slide show (newbie probs)



saramy
12-31-2005, 09:59 PM
Hi, i am probably missing something painfully obvious, but everytime I try to use the scripts I only ever get to see the "provided by dynamic...." script and no slide show.
could you please tell me which bits I am supposed to edit or remove - I use photobucket for my images so the tags are straight forward - do I have to make all my images the identical size, and is there an upper pixel limit?
Sorry to sound so dim. I am just getting the hand of all this html jargonand still need a bit of an isiots guide!
Thanks muchly

:o

jscheuer1
01-01-2006, 06:16 AM
The easiest way to help out is to see what you do have, take your best effort and put it up on the web somewhere and give us the url:

.

saramy
01-01-2006, 01:42 PM
I am sure you will laugh your socks at this as I have probably done something really dim - but here is the URL

http://vanitycompacts.mysite.wanadoo-members.co.uk/

I have it littered on page i and 2 - so what am I mising?

Sorry to be such a dunce!

:o

Twey
01-01-2006, 01:56 PM
Uhm... what's this?

<script type="text/javascript"><p>/***********************************************<br>* Conveyor belt slideshow script- &#169; Dynamic Drive DHTML code library (www.dynamicdrive.com)<br>* This notice MUST stay intact for legal use<br>* Visit Dynamic Drive at <a href="http://www.dynamicdrive.com/">http://www.dynamicdrive.com/</A> for full source code<br>***********************************************/<p><br>//Specify the slider's width (in pixels)<br>var sliderwidth="800px"<br>//Specify the slider's height<br>var sliderheight="400px"<br>//Specify the slider's slide speed (larger is faster 1-10)<br>var slidespeed=3<br>//configure background color:<br>slidebgcolor="#EAEAEA"<p>//Specify the slider's images<br>var leftrightslide=new Array()<br>var finalslide=''<br>leftrightslide[0]='<a href="http://"><img src="http://img.photobucket.com/albums/v444/juniorsmum/compacts/208.jpg" <br> border=1></a>'<br>leftrightslide[1]='<a href="http://"><img src="http://img.photobucket.com/albums/v444/juniorsmum/compacts/565.jpg" <br> border=1></a>'<br>leftrightslide[2]='<a href="http//"><img src="http://img.photobucket.com/albums/v444/juniorsmum/compacts/613.jpg" <br> border=1></a>'<br>leftrightslide[3]='<a href="http://"><img src="http://img.photobucket.com/albums/v444/juniorsmum/compacts/256.jpg" <br> border=1></a>'<br>leftrightslide[4]='<a href="http://"><img src="http://img.photobucket.com/albums/v444/juniorsmum/compacts/117.jpg" <br> border=1></a>'<p>//Specify gap between each image (use HTML):<br>var imagegap=" "<p>//Specify pixels gap between each slideshow rotation (use integer):<br>var slideshowgap=5<p><br>////NO NEED TO EDIT BELOW THIS LINE////////////<p>var copyspeed=slidespeed<br>leftrightslide='<nobr>'+leftrightslide.join(imagegap)+'</nobr>'<br>var iedom=document.all||document.getElementById<br>if (iedom)<br>document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+leftrightslide+'</span>')<br>var actualwidth=''<br>var cross_slide, ns_slide<p>function fillup(){<br>if (iedom){<br>cross_slide=document.getElementById? document.getElementById("test2") : document.all.test2<br>cross_slide2=document.getElementById? document.getElementById("test3") : document.all.test3<br>cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide<br>actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth<br>cross_slide2.style.left=actualwidth+slideshowgap+"px"<br>}<br>else if (document.layers){<br>ns_slide=document.ns_slidemenu.document.ns_slidemenu2<br>ns_slide2=document.ns_slidemenu.document.ns_slidemenu3<br>ns_slide.document.write(leftrightslide)<br>ns_slide.document.close()<br>actualwidth=ns_slide.document.width<br>ns_slide2.left=actualwidth+slideshowgap<br>ns_slide2.document.write(leftrightslide)<br>ns_slide2.document.close()<br>}<br>lefttime=setInterval("slideleft()",30)<br>}<br>window.onload=fillup<p>function slideleft(){<br>if (iedom){<br>if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8))<br>cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed+"px"<br>else<br>cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+slideshowgap+"px"<p>if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8))<br>cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed+"px"<br>else<br>cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+slideshowgap+"px"<p>}<br>else if (document.layers){<br>if (ns_slide.left>(actualwidth*(-1)+8))<br>ns_slide.left-=copyspeed<br>else<br>ns_slide.left=ns_slide2.left+actualwidth+slideshowgap<p>if (ns_slide2.left>(actualwidth*(-1)+8))<br>ns_slide2.left-=copyspeed<br>else<br>ns_slide2.left=ns_slide.left+actualwidth+slideshowgap<br>}<br>}<p><br>if (iedom||document.layers){<br>with (document){<br>document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')<br>if (iedom){<br>write('<div style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden">')<br>write('<div style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';background-color:'+slidebgcolor+'" onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">')<br>write('<div id="test2" style="position:absolute;left:0px;top:0px"></div>')<br>write('<div id="test3" style="position:absolute;left:-1000px;top:0px"></div>')<br>write('</div></div>')<br>}<br>else if (document.layers){<br>write('<ilayer width='+sliderwidth+' height='+sliderheight+' name="ns_slidemenu" bgColor='+slidebgcolor+'>')<br>write('<layer name="ns_slidemenu2" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')<br>write('<layer name="ns_slidemenu3" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')<br>write('</ilayer>')<br>}<br>document.write('</td></table>')<br>}<br>}<br></script><p><p align="center"><font face="Arial" size="-2">Free DHTML scripts provided by<br><br>You can't intersperse Javascript with HTML like that. At the very least, you need to use document.write() calls to output it.

jscheuer1
01-01-2006, 04:42 PM
Twey - I'm not sure why but, your code block is not showing up here for me. Perhaps it is because it is one 'too long' line. Others may see it, I cannot unless I quote it. Anyways, the code is:


<script type="text/javascript"><p>/***********************************************<br>* Conveyor belt slideshow script- Dynamic Drive DHTML code library (www.dynamicdrive.com)<br>* This notice MUST stay intact for legal use<br>* Visit Dynamic Drive at <a href="http://www.dynamicdrive

etc etc etc . . .

layer>')<br>}<br>document.write('</td></table>')<br>}<br>}<br></script>

and was probably pasted into a WYSIWYG editor and, in the process mangled by it. It should be:


<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="800px"
//Specify the slider's height
var sliderheight="400px"
//Specify the slider's slide speed (larger is faster 1-10)
var slidespeed=3
//configure background color:
slidebgcolor="#EAEAEA"
//Specify the slider's images
var leftrightslide=new Array()
var finalslide=''
leftrightslide[0]='<a href="http://"><img src="http://img.photobucket.com/albums/v444/juniorsmum/compacts/208.jpg" border=1></a>'
leftrightslide[1]='<a href="http://"><img src="http://img.photobucket.com/albums/v444/juniorsmum/compacts/565.jpg" border=1></a>'
leftrightslide[2]='<a href="http//"><img src="http://img.photobucket.com/albums/v444/juniorsmum/compacts/613.jpg" border=1></a>'
leftrightslide[3]='<a href="http://"><img src="http://img.photobucket.com/albums/v444/juniorsmum/compacts/256.jpg" border=1></a>'
leftrightslide[4]='<a href="http://"><img src="http://img.photobucket.com/albums/v444/juniorsmum/compacts/117.jpg" border=1></a>'
//Specify gap between each image (use HTML):
var imagegap=" "
//Specify pixels gap between each slideshow rotation (use integer):
var slideshowgap=5

////NO NEED TO EDIT BELOW THIS LINE////////////
var copyspeed=slidespeed
leftrightslide='<nobr>'+leftrightslide.join(imagegap)+'</nobr>'
var iedom=document.all||document.getElementById
if (iedom)
document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+leftrightslide+'</span>')
var actualwidth=''
var cross_slide, ns_slide
function fillup(){
if (iedom){
cross_slide=document.getElementById? document.getElementById("test2") : document.all.test2
cross_slide2=document.getElementById? document.getElementById("test3") : document.all.test3
cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide
actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth
cross_slide2.style.left=actualwidth+slideshowgap+"px"
}
else if (document.layers){
ns_slide=document.ns_slidemenu.document.ns_slidemenu2
ns_slide2=document.ns_slidemenu.document.ns_slidemenu3
ns_slide.document.write(leftrightslide)
ns_slide.document.close()
actualwidth=ns_slide.document.width
ns_slide2.left=actualwidth+slideshowgap
ns_slide2.document.write(leftrightslide)
ns_slide2.document.close()
}
lefttime=setInterval("slideleft()",30)
}
window.onload=fillup
function slideleft(){
if (iedom){
if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8))
cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed+"px"
else
cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+slideshowgap+"px"
if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8))
cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed+"px"
else
cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+slideshowgap+"px"
}
else if (document.layers){
if (ns_slide.left>(actualwidth*(-1)+8))
ns_slide.left-=copyspeed
else
ns_slide.left=ns_slide2.left+actualwidth+slideshowgap
if (ns_slide2.left>(actualwidth*(-1)+8))
ns_slide2.left-=copyspeed
else
ns_slide2.left=ns_slide.left+actualwidth+slideshowgap
}
}

if (iedom||document.layers){
with (document){
document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
if (iedom){
write('<div style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden">')
write('<div style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';background-color:'+slidebgcolor+'" onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">')
write('<div id="test2" style="position:absolute;left:0px;top:0px"></div>')
write('<div id="test3" style="position:absolute;left:-1000px;top:0px"></div>')
write('</div></div>')
}
else if (document.layers){
write('<ilayer width='+sliderwidth+' height='+sliderheight+' name="ns_slidemenu" bgColor='+slidebgcolor+'>')
write('<layer name="ns_slidemenu2" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
write('<layer name="ns_slidemenu3" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
write('</ilayer>')
}
document.write('</td></table>')
}
}
</script>

Then it at least works.

saramy
01-01-2006, 07:18 PM
Thanks - But I still can't get anything to show. So I have decided to give up for now before I go totally nuts!
I think it may be becuase my pictures are not exactly the same size - so will try that option before giving up totally!

Cheers and happy new year to you all.

Twey
01-01-2006, 07:53 PM
Twey - I'm not sure why but, your code block is not showing up here for me.How peculiar. What browser and platform are you using?

jscheuer1
01-01-2006, 09:01 PM
Twey - I'm not sure why but, your code block is not showing up


How peculiar. What browser and platform are you using?

I just double checked and it appears OK here in IE6 and Opera8. In NS8 in FF mode and in FF itself, no can see. Also, under Opera it is wrapped, while under IE it is just one long line. If I highlight it under FF or NS8 in FF mode it appears sporadically. All of these under win XP home with live update.

To saramy:

You should probably only use a text editor to insert and edit scripts on your pages.

saramy
01-02-2006, 11:43 AM
Thanks
I may give it another go when I work out why I am getting things all wierd!
I use XP, and IE6 - I think it may be a problem with my web site hosting software which is a bit on the carp side.
I will try and find a better hosting service and start again - plus I think a domain name would be better than a plain http.
I am sure I will be back picking your brains again in the future. But thanks for all your help and not laughting at me - well out loud anyway!
Sara