1) Script Title: Conveyor Belt slideshow script
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...rightslide.htm
3) Describe problem: when i implement the script, sometimes it stops pauses randomly
1) Script Title: Conveyor Belt slideshow script
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...rightslide.htm
3) Describe problem: when i implement the script, sometimes it stops pauses randomly
Please post a link to the page on your site that contains the problematic script or attach your code so we can check it out and help you.
its not uploaded yet, is it acceptable to post the code and script?
Sure, juts remember to use [html] [/html] tags for HTML code, [php] [/php] tags for PHP code and [code] [/code] tags for other code.
Page:
HTML Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script language="javascript" type="text/javascript"> function positionMe() { var w = 0; var h = 0; //IE if(!window.innerWidth) { //strict mode if(!(document.documentElement.clientWidth == 0)) { w = document.documentElement.clientWidth; h = document.documentElement.clientHeight; } //quirks mode else { w = document.body.clientWidth; h = document.body.clientHeight; } } //w3c else { w = window.innerWidth; h = window.innerHeight; } if (w > 900) { document.getElementById("mainBody").style.paddingRight = ((w - 900) / 2) + "px"; document.getElementById("mainBody").style.paddingLeft = document.getElementById("mainBody").style.paddingRight; } if (h > 600) { document.getElementById("mainBody").style.marginTop = ((h - 600) / 3) + "px"; } } </script> <style type="text/css"> <!-- body { margin:0; font-family: arial; } .mainBody { width:900px; height:600px; background-color:#F0FFF0; } .logo { margin:20px auto 5px auto; padding:20px 0 10px 0; width:860px; border-bottom:solid #673301 1px; } .logo img { border:none; } .navBar { margin:0 0 10px; text-align:right; } .navBar img { border:none; margin:0 20px; } .slider { margin:auto; width:860px; height: 136px; } .slider img { border:none; margin:0; padding:0 } .hTextBody { width:860px; margin:0 auto 20px; height: 270px; text-align: justify; letter-spacing: 3px; font-size: 14px; } .contactTextBody { width:860px; margin:0 auto 20px; height: 406px; text-align: center; letter-spacing: 3px; font-size: 14px; } .contactTextBody p { margin:0; } .textBody { width:860px; margin:0 auto 20px; height: 406px; text-align: justify; letter-spacing: 3px; font-size: 14px; } .textBody p { margin:0; } .aboutImg img { float: left; margin: 0 10px 5px 0; height: 215px; width: 215px; background-color: #78AE82; } .pageFooter { color:#78AE82; text-align:center; width:860px; margin:0 auto; font-size:12px; } .casaForm { width: 484px; margin: 30px auto 0; text-align: right; font-size: 17px; } .casaForm p { margin: 10px 0; } .casaForm .textBox { background-color: #78AE82; border: none; width: 280px; height: 20px; font-size: 17px; vertical-align: middle; padding: 10px; color: #FFFFFF; } .casaForm .textBoxMulti { background-color: #78AE82; border: none; width: 280px; height: 80px; font-size: 17px; vertical-align: text-top; padding: 10px; color: #FFFFFF; font-family: arial; } .casaForm button { border:none; background-color:#F0FFF0; } .servSlideShow { width: 430px; float: left; height: 406px; margin-right: 20px; } .greenSlideShow { float: right; margin: 0 0 5px 10px; height: 215px; width: 215px; background-color: #78AE82; } --> </style> <title>Casa Domani</title> </head> <body onLoad="positionMe();" onResize="positionMe();"> <div class="mainBody" id="mainBody"> <div class="logo"> <a href="#"><img src="images/casaDomani.gif" alt="Casa Domani" width="299" height="46"></a> </div> <div class="navBar"> <a href="our_services.html" onMouseOver="document.ourServices.src='images/ourServicesLit.gif'" onMouseOut="document.ourServices.src='images/ourServicesDim.gif'"><img name="ourServices"src="images/ourServicesDim.gif" alt="Our Services"></a> <a href="green_building.html" onMouseOver="document.greenBuilding.src='images/greenBuildingLit.gif'" onMouseOut="document.greenBuilding.src='images/greenBuildingDim.gif'"><img name="greenBuilding" src="images/greenBuildingDim.gif" alt="Green Building"></a> <a href="about_us.html" onMouseOver="document.aboutUs.src='images/aboutUsLit.gif'" onMouseOut="document.aboutUs.src='images/aboutUsDim.gif'"><img name="aboutUs" src="images/aboutUsDim.gif" alt="About Us"></a> <a href="contact_us.html" onMouseOver="document.contactUs.src='images/contactUsLit.gif'" onMouseOut="document.contactUs.src='images/contactUsDim.gif'"><img name="contactUs" src="images/contactUsDim.gif" alt="Contact Us"></a> </div> <div class="slider"> <script language="javascript" type="text/javascript" src="js/conveyor.js"></script> </div> <div class="hTextBody"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla iaculis erat sed nisi elementum sed adipiscing nibh lobortis. Nam magna mi, dictum vel rhoncus id, sollicitudin vel nisl. Donec pulvinar mollis vulputate. Nam vitae neque dolor, a porta nibh. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam tristique pellentesque felis id mattis. Phasellus pellentesque fringilla diam, id pharetra neque viverra in. Praesent vitae accumsan ante. Vestibulum sed imperdiet quam. Aliquam erat volutpat. Fusce mollis varius orci eget tempus. Donec dolor eros, hendrerit at ornare sed, pretium vel quam. Maecenas nisi velit, dapibus a aliquam sit amet, tincidunt a augue. Etiam rutrum sem nec dui interdum a adipiscing velit mollis.</p> <p>Nulla facilisi. Donec volutpat nisi et nisl faucibus vel dignissim sapien dictum. Quisque tortor lorem, sagittis quis ultrices at, pellentesque vitae lacus. In justo odio, ultrices vitae egestas at, ullamcorper tempus mi. Morbi quis nibh sem. Maecenas volutpat, libero sed auctor porta, est ligula viverra nisi, sed vehicula arcu felis sit amet magna. In ac dui id purus varius porta. Proin sed augue a dui gravida venenatis ut nec nisi. Pellentesque consectetur mauris eget felis egestas iaculis. Quisque egestas lobortis quam eu interdum.</p> </div> <div class="pageFooter"> ©2009 Casa Domani </div> </div> </body> </html>
Javascript Code:
Code:/*********************************************** * 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="860px" //Specify the slider's height var sliderheight="136px" //Specify the slider's slide speed (larger is faster 1-10) var slidespeed=2 //configure background color: slidebgcolor="#F0FFF0" //Specify the slider's images var randomslides=new Array() var finalslide='' randomslides[0]='<img src="images/slideshow/IMG_0907.jpg">' randomslides[1]='<img src="images/slideshow/IMG_0916.jpg">' randomslides[2]='<img src="images/slideshow/IMG_0934.jpg">' randomslides[3]='<img src="images/slideshow/IMG_0928.jpg">' randomslides[4]='<img src="images/slideshow/IMG_0989.jpg">' randomslides[5]='<img src="images/slideshow/IMG_0998.jpg">' var leftrightslide = new Array(); //MultiRandomizer by AJ Pinto thenajsays@gmail.com function MultiRandomizer() { var p = new Array(); for (i = 0; i < 99; i++) { var n = Math.floor(Math.random() * 6); leftrightslide[i] = randomslides[n]; if(n != p[0] && n != p[1] && n != p[2]) { leftrightslide[i] = randomslides[n]; p[0] = p[1]; p[1] = p[2]; p[2] = n; } else { while (n == p[0] || n == p[1] || n == p[2]) { n = Math.floor(Math.random() * 6); } leftrightslide[i] = randomslides[n]; p[0] = p[1]; p[1] = p[2]; p[2] = n; } } } //End MultiRandomizer //Specify gap between each image (use HTML): var imagegap="" //Specify pixels gap between each slideshow rotation (use integer): var slideshowgap=0 MultiRandomizer(); ////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+'"') 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></layer>') write('<layer name="ns_slidemenu3" left=0 top=0></layer>') write('</ilayer>') } document.write('</td></table>') } }
Bookmarks