Well, there are conflicts and there are conflicts. An interesting test you devised there for your two scripts and yes, as you describe it, it does demonstrate that the two particular scripts you used could work together if only they didn't conflict in grabbing the onload event of the page.
How to resolve this? It depends upon how each script is accessing the onload event of the page and also upon how you want to combine these two events into one.
The easiest way, if the two scripts cooperate, is to remove and/or move each scripts onload event to the body tag or leave it there and add to it if it is already there, say one is coded into the script like so:
Code:
window.onload=fillup
and the other already uses the body tag's onload event:
HTML Code:
<body onload="goForIt();">
These two could be combined in the body tag like so:
HTML Code:
<body onload="goForIt();fillup();">
The important thing to notice is that when coded in the script, an onload function call will look like so:
fillup
or
fillup;
But when placed in the body onload event must be made like so:
fillup();
More information is found following the tutorial in the sticky below:
Note: Questions regarding multiple script usage are not usually replied to due to their time consuming nature. See this thread for more information, and this tutorial for one possible solution.
Bookmarks