If you need a compact way to use prototype and listen to on onresize event in a cross-browser manner, this is the way to go: [source:js] Event.observe(document.onresize ? document : window, "resize", function() {//dostuff}); [/source] As you can see, the event to listen is resize but depending on the browser, it may be fired on either the window or the document object. Quirksmode has as usual an explanation of which browser support the one or the other Of course, you should never use the apparently simpler [source:js] document.onresize = function() {}; [/source] if you want a robust solution since you will overwrite any other event listeners that can have been add by other libraries ( Bobobobo has a bad example)