Forum Moderators: open
I have a PHP file that renders (and is served as) the JavaScript which based on conditions (detected serverside) determine which functions are loaded in to the onload function...so if a function isn't needed then PHP won't echo that function name in to the master function. The master function is loaded via window.onload.
Anyway what is the simplest way or alternative to window.onload for IE without any other browsers to be considered for any possible issues? I know this sounds cheap but conditional comments allow it. ;)
- John
Comment out ALL of the code in
init28();
target();
init28ie();
and simply have an alert in each function saying (for e.g.)
function init28(){
alert('init28 has fired');
/* all the other code commented out
...
...
*/
}
That will only take a few minutes and there's a high chance it will reveal if/where there is a bug
So window.onload doesn't work for squat in IE6...
I agree. It's highly unlikely, John. I've never had a problem, and if this were the case, the whole scripting world would know about it by now.
The most common problem with assiging onload event is conflicts with others. Do you have another script that assigns a function to onload (presumeably aftwerards)?
It may be time to try attachEvent/adEventListener instead.