Log in

View Full Version : Fade Scroller skips



mahart663
08-30-2005, 06:29 PM
Hi,
I am using the following scroller - ->http://www.dynamicdrive.com/dynamicindex2/fadescroll.htm on my homepages and the messages either skip or don't even get acknowledged. What do I need to do to get the messages to go in order? I have 2 onload events, so I disabled the window.onload=changecontent in the code and put it in the body tag along with the other onload event. Could that be causing the discrepancies?

jscheuer1
08-30-2005, 07:45 PM
ohbgvfvhn

mahart663
08-30-2005, 08:15 PM
www.crownworldwide.com

jscheuer1
08-30-2005, 09:13 PM
OK, a problem here is that the script is already partially written to avoid conflicts onload. By commenting out just the last part of that language:

if (window.addEventListener)
window.addEventListener("load", changecontent, false)
else if (window.attachEvent)
window.attachEvent("onload", changecontent)
else if (document.getElementById)
//window.onload=changecontentand adding the event onload to the body tag, you've created a situation where the event is either loaded twice or not at all, depending upon the browser used. I'd get rid of the onload event from the body tag and replace the entire code I've included above with:

if ( typeof window.addEventListener != "undefined" )
window.addEventListener( "load", changecontent, false );
else if ( typeof window.attachEvent != "undefined" ) {
window.attachEvent( "onload", changecontent );
}
else {
if ( window.onload != null ) {
var oldOnload = window.onload;
window.onload = function ( e ) {
oldOnload( e );
changecontent();
};
}
else
window.onload = changecontent;
}This will get rid of that problem. There may be others but, this is probably it as concerns the 'Fading scroller' script.

mahart663
08-31-2005, 01:59 PM
thank you John. :)