Possible Duplicate:
Adding multiple onload handlers
can i add another onload callback on existing onload?
i have implemented bigpipe on the site and resources (javascript) gets loaded on demand and after javascript is loaded properly, then javascript code gets executed.
this is javascript code i have
var code = document.createElement('script');
code.setAttribute("type", "text/javascript");
code.setAttribute("src", this.file);
code.onload = this.onComplete.bind(this);
code.onreadystatechange = code.onload; // ie fix
after this code is executed, can i add another onload callback on top of this, so they both get triggered, once this resource gets done loading?