Portal Home > Knowledgebase > Articles Database > window.onload Issue
window.onload Issue
Posted by openXS, 08-27-2007, 11:03 AM |
Hi,
I've two JS that seem to be conflicting with each other. Just of them works due to the window.onload issue:
First one has "window.onload=function()" and the other one "window.onload=stripe"
Is there anyway I can get both these JS to work correctly in IE/FF/Safari?
Any help greatly appreciated.
Many Thanks.
|
Posted by Steve_Arm, 08-27-2007, 11:11 AM |
body onLoad="function()"> ?
|
Posted by openXS, 08-27-2007, 11:14 AM |
Tried that already, the other JS doesn't work. Should I put up both JS for you to see?
|
Posted by openXS, 08-27-2007, 11:16 AM |
First:
Second:
|
Posted by Steve_Arm, 08-27-2007, 11:16 AM |
Sure. Why not merge them into a single window.onload?
|
Posted by Xenatino, 08-27-2007, 06:42 PM |
I would recommend either combining them into one function:-
Or creating 1 function to call 2 others:-
|
Posted by foobic, 08-27-2007, 06:55 PM |
Wordpress uses this code to handle multiple onload functions. To use it replace all window.onload=functionname with addLoadEvent(functionname):
|
Add to Favourites Print this Article
Also Read