PDA

View Full Version : Javascript OnLoad Function


SorentoUltimate
05-30-2010, 03:39 AM
Hello,

I have one javascript named george.js
At the bottom of javascript i have that code
var previousOnload = window.onload;
window.onload = function () { alert('into george javascript'); if(previousOnload) previousOnload(); dogeorgemainfunction(); } _

I have another javascript named stella.js
At the bottom of javascript i have that code
var previousOnload = window.onload;
window.onload = function () { alert('into stella javascript'); if(previousOnload) previousOnload(); dostellamainfunction(); } _

At my tamplate i have add:
<script type="text/javascript" src="clientscript/george.js"></script>
<script type="text/javascript" src="clientscript/stella.js"></script> _

I aslo have
<body onload="$onload"> _
in the same template

But when the page open run only the one of the two onload........
What i have to do to run the onloads from the two javacripts???

(I check only first and work perfect, then i check only second and work perfect, when i have together go only to one javascript onload)

waiting your help

Thanks In Advance
SorentoUltimate