Hi
1) How can I tell IE6 to call a function with some arguments? Where function is a callback.
I tried:
callback.apply(this, callback_args) however this returns “Object does not support property or method”
2) I am trying to implement a simple onLoad function that works everywhere. I used to use Prototype, however it’s too big to include just for that. Here is what I have, is there a better version than this?
function addOnloadEvent(fnc){
if ( typeof window.addEventListener != “undefined” )
window.addEventListener( “load”, fnc, false );
else if ( typeof window.attachEvent != “undefined” ) {
window.attachEvent( “onload”, fnc );
}
else {
if ( window.onload != null ) {
var oldOnload = window.onload;
window.onload = function ( e ) {
oldOnload( e );
window[fnc
};
}
else
window.onload = fnc;
}
}
—
M.