215Chapter 15 .Generic HTML Element Objects Example on (Apache web server tutorial)
Saturday, October 27th, 2007215Chapter 15 .Generic HTML Element Objects Example on the CD-ROM Related Item: readyState property. onResize NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility The onResize event handler fires whenever an object is resized in response to a variety of user or scripted actions. In NN4+, the onResize event handler is available only for the window object; IE4 includes this event handler for the APPLET, AREA, BUTTON, DIV, FIELDSET, FRAMESET, IMG, MARQUEE, SELECT, TABLE, TD, TH, and windowobjects. Virtually every content-containing element in IE5+ has this event handler, provided the object has dimensional style attributes (for example, height, width, or position) assigned to it. Window resizing presents potentially serious problems in NN4, especially when the page contains positioned elements. Unlike IE4+ and NN6, the NN4 rendering engine typically fails to redraw a resized page properly. A reload of the page usually fixes the problems. You can use the onResize event handler in NN4 to repair the damage: window.onresize = restorePage function restorePage() { history.go(0) } But there is one additional complication in NN4 for Windows when the content of a window or frame requires scrollbars. The application of the scrollbars forces another resize event. In concert with the preceding code, the page gets in an infinite loop of reloading the page. To guard against this, your script must compare the innerWidth and innerHeightof the window before and after the resize event: var Nav4 = ((navigator.appName == Netscape )&& (parseInt(navigator.appVersion) == 4)) window.onresize = restorePage if (Nav4) { var startWidth = window.innerWidth var startHeight = window.innerHeight } function restorePage() { if (Nav4) { if (startWidth != window.innerWidth|| startHeight != window.innerHeight) { history.go(0) } } } On the CD-ROM elementObject.onResize
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.