Friday, February 17, 2012

HTMLInstance.attachEvent onload


The following code works with IE9 but not with IE8




HTMLInstance.attachEvent("onclick" , function() { } ); // work with IE8
HTMLInstance.attachEvent("onload" , function() { } ); // does not work with IE8 but works with IE9



How can I fix the problem with onlaod event ?

1 comment:

  1. There is no onload event in IE 8 so you should use window.onload or window.body.onload

    window.onload = function(){

    }

    ReplyDelete