Answers
Oct 12, 2006 - 09:18 PM
Oct 13, 2006 - 11:45 AM
Now you could say that why don't I just include that line "init();" as the first one in the actual script?
Beacuse maybe I want to include the script without executing the init() in some cases.
Don't worry, there are plenty of other solutions, I just would like to know if anyone had knowledge about this specific issue.
I'll keep the question open...
Oct 31, 2006 - 08:35 PM
if (window.addEventListener) window.addEventListener('load',init,false);
else if (document.addEventListener) document.addEventListener('load',init,false);
else if (window.attachEvent) window.attachEvent('onload',init);
else {//Older browsers only
if (typeof window. {
var oldload=window.onload;
window.
oldload();
init();
}
} else window.
}
Nov 05, 2006 - 10:04 PM
And another thing; at what point and how do you suggest to run the script you propose?
Nov 06, 2006 - 05:44 PM
Nov 21, 2006 - 08:32 AM
if I put it in a script tag below the one that loads the script - wouldn't that just pollute the markup even more?
And if I put it inside the script itself, then I know that the script is already loaded, and I no longer need to attach any onload event to it!
Finally, my original question still stands uncommented:
Why doesn't the even fire - even though the documentation provided by the manufacturer states that it should?
I can see three posibilities so far:
1) I am reading the documentation wrong
2) I am reading the wrong documentation
3) It is a bug (may be limited to certain versions)
Aug 19, 2007 - 09:35 PM
Nov 24, 2008 - 08:48 AM
Oct 12, 2009 - 08:25 AM
!
Dec 29, 2010 - 12:46 AM
Add New Comment