is there any event that needs to be handled between dom: loaded and loaded using the prototype javascript framework?
I used a preloader using a prototype that looks like this:
Event.observe(window,"load",preload); function preload(){ if($('wrapper')) $('wrapper').setStyle({"display":"block"}); if($('loading')) setTimeout('$("loading").fade({duration: 5.0});',4000); }
then I have another handler that uses to correct the height of the column:
Event.observe(window,"load",function(){ var bottomExtraOffset = (Prototype.Browser.IE) ? 100 : 130; if(parseInt($$('.col1')[0].getStyle('height')) > parseInt($$('.col2')[0].getStyle('height'))) $('wrapper').setStyle({'height' : parseInt($$('.col1')[0].getStyle('height'))+bottomExtraOffset+'px'}); else $('wrapper').setStyle({'height' : parseInt($$('.col2')[0].getStyle('height'))+bottomExtraOffset+'px'}); });
It works very well in any browser, but IE! It seems that IE does not add the second handler to the list of onload handlers, so when the first tries to get the height of any of the columns, it returns 0 coz, it still displays as none.
is there any other event besides load and dom: is loaded to be processed and exited from this !?
javascript prototypejs internet-explorer event-handling events
user80276
source share