PDA

View Full Version : How can I have two scripts on one page?



Anita23
03-10-2007, 10:34 AM
1) Script Title:
Image w/ description tooltip and Cross Browser marquee
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm
http://www.dynamicdrive.com/dynamicindex2/cmarquee.htm
3) Describe problem:
I want to have this two scripts on my page, but they don't work together. Only one works. What can I do?

jscheuer1
03-10-2007, 03:33 PM
There is an onload conflict between the two scripts. There could be other problems but, this must be resolved first. There are several ways, here's one -

Remove:


window.onload = initTip;

and:


window.onload=populate

Now, in your body tag have:


<body onload="initTip();populate();">

Anita23
03-12-2007, 02:22 PM
Thank you very much, it works.:)