PDA

View Full Version : Why did rolloevers stop working when I added slideshow script?



AviatorTim
09-15-2011, 11:24 PM
I added the DD Conveyor Belt Slideshow Script to my existing page. The slideshow works fine. However, my rolloevers stopped working. Can anyone please help me identify why?

The page is simple so I posted it in its entirety:

<HTML>
<HEAD>
<TITLE>Photographer Timothy Michael</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<meta name="description" content="Photographer Timothy Michael Morgan, Orlando, FL">
<meta name="keywords" content=" nature photography, photography, photographer, photographic art, photos on canvas">
<!-- ImageReady Preload Script (home page.psd) -->
<SCRIPT TYPE="text/javascript">
<!--

function newImage(arg) {
if (document.images) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}

function changeImages() {
if (document.images && (preloadFlag == true)) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
}
}
}

var preloadFlag = false;
function preloadImages() {
if (document.images) {
logo_banner_about_over = newImage("homepage_images/logo_banner-about_over.gif");
logo_banner_portfolio_over = newImage("homepage_images/logo_banner-portfolio_over.gif");
logo_banner_store_over = newImage("homepage_images/logo_banner-store_over.gif");
logo_banner_contact_over = newImage("homepage_images/logo_banner-contact_over.gif");
preloadFlag = true;
}
}

// -->
</SCRIPT>
<!-- End Preload Script -->
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 ONLOAD="preloadImages();">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr><td align="center" valign="middle">
<!-- ImageReady Slices (home page.psd) -->
<TABLE WIDTH=800 BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>
<TD COLSPAN=9 BGCOLOR=#FFFFFF>
<IMG SRC="homepage_images/home_01.gif" WIDTH=800 HEIGHT=158 ALT=""></TD>
</TR>
<TR>
<TD COLSPAN=9 BGCOLOR=#FFFFFF>
<IMG NAME="logo_banner" SRC="homepage_images/logo_banner.gif" WIDTH=800 HEIGHT=135 ALT=""></TD>
</TR>
<TR>
<TD>
<IMG SRC="homepage_images/home_03.gif" WIDTH=75 HEIGHT=30 ALT=""></TD>
<TD BGCOLOR=#FFFFFF>
<A HREF="http://www.timothymichaelphotography.com/about.html"
ONMOUSEOVER="changeImages('logo_banner', 'homepage_images/logo_banner-about_over.gif'); return true;"
ONMOUSEOUT="changeImages('logo_banner', 'homepage_images/logo_banner.gif'); return true;">
<IMG SRC="homepage_images/about.gif" WIDTH=54 HEIGHT=30 BORDER=0 ALT=""></A></TD>
<TD BGCOLOR=#FFFFFF>
<IMG SRC="homepage_images/home_05.gif" WIDTH=90 HEIGHT=30 ALT=""></TD>
<TD BGCOLOR=#FFFFFF>
<A HREF="http://www.timothymichaelphotography.com/portfolio.html"
ONMOUSEOVER="changeImages('logo_banner', 'homepage_images/logo_banner-portfolio_over.gif'); return true;"
ONMOUSEOUT="changeImages('logo_banner', 'homepage_images/logo_banner.gif'); return true;">
<IMG SRC="homepage_images/portfolio.gif" WIDTH=79 HEIGHT=30 BORDER=0 ALT=""></A></TD>
<TD BGCOLOR=#FFFFFF>
<IMG SRC="homepage_images/home_07.gif" WIDTH=102 HEIGHT=30 ALT=""></TD>
<TD BGCOLOR=#FFFFFF>
<A HREF="http://www.timothymichaelphotography.com/store.html"
ONMOUSEOVER="changeImages('logo_banner', 'homepage_images/logo_banner-store_over.gif'); return true;"
ONMOUSEOUT="changeImages('logo_banner', 'homepage_images/logo_banner.gif'); return true;">
<IMG SRC="homepage_images/store.gif" WIDTH=59 HEIGHT=30 BORDER=0 ALT=""></A></TD>
<TD BGCOLOR=#FFFFFF>
<IMG SRC="homepage_images/home_09.gif" WIDTH=83 HEIGHT=30 ALT=""></TD>
<TD BGCOLOR=#FFFFFF>
<A HREF="http://www.timothymichaelphotography.com/contact.html"
ONMOUSEOVER="changeImages('logo_banner', 'homepage_images/logo_banner-contact_over.gif'); return true;"
ONMOUSEOUT="changeImages('logo_banner', 'homepage_images/logo_banner.gif'); return true;">
<IMG SRC="homepage_images/contact.gif" WIDTH=64 HEIGHT=30 BORDER=0 ALT=""></A></TD>
<TD>
<IMG SRC="homepage_images/home_11.gif" WIDTH=194 HEIGHT=30 ALT=""></TD>
</TR>
<TR>
<TD COLSPAN=9 BGCOLOR=#FFFFFF>
<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="250px"
//Specify the slider's slide speed (larger is faster 1-10)
var slidespeed=1
//configure background color:
slidebgcolor="#FFFFFF"

//Specify the slider's images
var leftrightslide=new Array()
var finalslide=''
leftrightslide[0]='<img src="homepage_images/crawl-1.jpg" border=1></a>'
leftrightslide[1]='<img src="homepage_images/crawl-2.jpg" border=1></a>'
leftrightslide[2]='<img src="homepage_images/crawl-3.jpg" border=1></a>'
leftrightslide[3]='<img src="homepage_images/crawl-4.jpg" border=1></a>'
leftrightslide[4]='<img src="homepage_images/crawl-5.jpg" border=1></a>'
leftrightslide[5]='<img src="homepage_images/crawl-6.jpg" border=1></a>'
leftrightslide[6]='<img src="homepage_images/crawl-7.jpg" border=1></a>'
leftrightslide[7]='<img src="homepage_images/crawl-8.jpg" border=1></a>'
leftrightslide[8]='<img src="homepage_images/crawl-9.jpg" border=1></a>'
leftrightslide[9]='<img src="homepage_images/crawl-10.jpg" border=1></a>'
leftrightslide[10]='<img src="homepage_images/crawl-11.jpg" border=1></a>'
leftrightslide[11]='<img src="homepage_images/crawl-12.jpg" border=1></a>'
leftrightslide[12]='<img src="homepage_images/crawl-13.jpg" border=1></a>'
leftrightslide[13]='<img src="homepage_images/crawl-14.jpg" border=1></a>'
//<a href="http://">

//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>
</TD>
</TR>
</TABLE>
<!-- End ImageReady Slices -->
</td></tr></table>
</BODY>
</HTML>

jscheuer1
09-16-2011, 01:43 AM
Get rid of this:


window.onload=fillup

Change this:


<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 ONLOAD="preloadImages();">

to:


<body bgcolor="#fff" leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onload="preloadImages(); fillup();">

AviatorTim
09-16-2011, 10:41 PM
That fixed it. Thanks John!!