Instead of using window.onload, you can *add* your onload event handler to the existing handlers.
But another way is to simply call one of the onload initializations from the other.
For example, if you have:
Code:
window.onload = setupTabbber;
...
window.onload = initPage;
...
The second onload will, as you noted, wipe out the first one.
So just call the first one from your initPage, thus:
Code:
function initPage() {
setupTabber( );
if (this.GetCustomerGUID)
document.forms["Test"].elements["CustomerGUID"].value = GetCustomerGUID();
}
The other way to do it is to create an onload-appender, but now you get into the world of browser dependencies.
Code:
function addOnLoad( functionToCall )
{
if (window.addEventListener) {
window.addEventListener('load', functionToCall, false);
} else if (window.attachEvent) {
window.attachEvent('onload', functionToCall);
}
}
... and then do ...
addOnLoad( setupTabber );
...
addOnLoad( initPage );
...