291Chapter 16 .Window and Frame (How to cite a web site) Objects One of
291Chapter 16 .Window and Frame Objects One of the reasons I call a dialog box window an (almost) window object is that some normal behavior is not available in IE4. For example, if you load a frameset into the dialog box window, scripts in documents within the frames cannot refer back to the parent document to access variables or parent window methods. Thus, a button in a frame of an IE4 modal dialog box cannot issue parent.close() to close the dialog box. This anomaly is repaired in IE5. On the CD-ROM Example (with Listings 16-39 through 16-42) on the CD-ROM Related Items: window.open() method. sizeToContent() Returns: Nothing. NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility . The NN6 window.sizeToContent() method can be a valuable aid in making sure that a window (especially a subwindow) is sized for the optimum display of the window s content. But you must also be cautious with this method, or it will do more harm than good. Invoking the sizeToContent() method resizes the window so that all content is visible. Concerns about variations in OS-specific rendering become a thing of the past. Naturally, you should perform this action only on a window whose content at the most occupies a space smaller than the smallest video monitor running your code (typically 640 480 pixels, but conceivably much smaller for future versions of the browser used on handheld computers). You can get the user in trouble, however, if you invoke the method twice on the same window that contains the resizing script. This action can cause the window to expand to a size that may exceed the pixel size of the user s video monitor. Successive invocations fail to cinch up the window s size to its content again. Multiple invocations are safe, however, on subwindows when the resizing script statement is in the main window. On the Example on the CD-ROM CD-ROM Related Item: window.resizeTo() method. windowObject.sizeToContent()
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.