Click to See Complete Forum and Search --> : two scripts using setInterval()


webtekie
08-13-2003, 10:23 AM
Hi,

I have two JavaScripts on my page and both of them are using setInterval() method. One script is a ticker and other is text fader. What happens is that if I use ticker without fader, ticker scrolls smooth. However, if I use fader together with ticker, the ticker kind of jurks (not a smooth scroll). Why is this happening?

thanks,
webtekie

Khalid Ali
08-13-2003, 10:33 AM
Chances are both of them are using window.onlaod event..make sure this does not happen.

webtekie
08-13-2003, 10:39 AM
but what if I need both of them to use window.onload event?

Khalid Ali
08-13-2003, 10:42 AM
You can not use 2 instances of window.onload event.However what you can do is call a function say startUP() with window.onload and in that function you can call those 2 methods that are being cvalled by onload event for both of the scripts.

webtekie
08-13-2003, 10:44 AM
got it. thanks!

Khalid Ali
08-13-2003, 10:51 AM
you are welcome..:D