PDA

View Full Version : Help using 2 dd scripts on 1 page



Pat Fisher
09-18-2004, 04:40 PM
I am trying to use 2 dd scripts on my school’s homepage.
http://pcboe.net/chs.htm

dd fadeinslideshow and dd fadingscroller
http://dynamicdrive.com/dynamicindex14/fadeinslideshow.htm
http://dynamicdrive.com/dynamicindex2/fadescroll.htm

I am using the scripts as is except for the var pause, var height&width of jpgs & scroller, and border of the scroller.

I found a posting
SCRIPT 1: window.onload=startit
SCRIPT 2: window.onload=dothat
RESOLUTION: <body onload="dothis();dothat()">
which had me find these 2 parts of each script:
window.onload=startit
window.onload=changecontent

I deleted both and placed <body onload=”startit();changecontent()”>
But then neither script worked.

Can someone help me? I know virtually nothing about scripting but will to do whatever to fix this conflict. Maybe
I placed the resolution in the wrong place, or maybe there are more conflicts?????

Thank you.

gigabites
09-22-2004, 12:19 AM
First, edit startit() function in Fade-in slideshow script:


function startit(){
if (ie4||dom){
var crossobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
crossobj.innerHTML='<img src="'+fadeimages[curimageindex]+'">'
rotateimage()
}
else
setInterval("rotateimage()",pause)
}


Second, delete or comment

if (ie4||dom)
window.onload=startit
else
setInterval("rotateimage()",pause)
in Fade-in slideshow script and

window.onload=changecontent
in Fading Scroller script

Third, add this

<body onLoad="startit(),changecontent()">
In the body tag.

I hope that'll work.

Pat Fisher
09-23-2004, 01:43 AM
gigabites,

Thank you very much. This works fine. Appreciate the helpfulness. Have a great evening.