Although the documentation ( http://www.w3schools.com/jsref/event_onresize.asp ) states:
I can not get a situation where resizing a div causes the oresize handler to be executed.
It looks like onresize only works on the window object and the body tag.
Among other things, i tried this, a simple mod to the example code:
<!DOCTYPE html><html><head><script>function myFunction(){var w=window.outerWidth;var h=window.outerHeight;var txt="Window size: width=" + w + ", height=" + h;document.getElementById("demo").innerHTML=txt;}</script></head><body>