369Chapter 16Window and Frame ObjectsWindow properties are far (Cpanel web hosting)

369Chapter 16Window and Frame ObjectsWindow properties are far more flexible on all browsers when your scripts generate a newwindow (with the window.open()method): You can influence the size, toolbar, or other viewoptions of a window. Recent browser versions provide even more options for new windows, including the position of the window and whether the window should even display a title bar. Again, if an option can conceivably be used to deceive a user (for example, silently hiding onewindow that monitors activity in another window), signed scripts and/or user permission arenecessary. The windowobject is also the level at which a script asks the browser to display any of threestyles of dialog boxes (a plain alert dialog box, an OK/Cancel confirmation dialog box, or aprompt for user text entry). Although dialog boxes are extremely helpful for cobblingtogether debugging tools for your own use (see Chapter 45 on the CD-ROM), they can be verydisruptive to visitors who navigate through Web sites. Because most JavaScript dialog boxesare modal (that is, you cannot do anything else in the browser until you dismiss the dialogbox), use them sparingly, if at all. Remember that some users may create macros on theircomputers to visit sites unattended. Should such an automated access of your site encountera modal dialog box, it is trapped on your page until a human intervenes. All dialog boxes generated by JavaScript identify themselves as being generated byJavaScript. This is primarily a security feature to prevent deceitful scripts from creating sys- tem- or application-style dialog boxes that convince visitors to enter private information. Itshould also discourage dialog box usage in Web page design. And that s good, because dialogboxes tend to annoy users. With the exception of the IE-specific modal and modeless dialog boxes (see the window.showModalDialog()and window.showModeless()methods), JavaScript dialog boxes arenot particularly flexible in letting you fill them with text or graphic elements beyond the basics. In fact, you can t even change the text of the dialog box buttons or add a button. With DHTML- capable browsers, you can use positioned divor iframeelements to simulate dialog boxbehavior in a cross-browser way. With respect to the W3C DOM, the window is outside the scope of the standard throughDOMLevel 2. The closest that the standard comes to acknowledging a window at all is thedocument.defaultViewproperty, which evaluates to the windowobject in today s browsers(predominantly Mozilla). But the formal DOM standard specifies no properties or methodsforthis view object. PropertiesappCoreComponents[] controllers[] promptersidebarValues:See text.Read-OnlyCompatibility:WinIE-, MacIE-, NN6+, Moz1+, Safari- NN6+/Mozilla provides scriptable access to numerous services that are part of the xpconnectpackage ( xp stands for cross-platform ). These services allow scripts to work with COMobjects and the mozilla.org XUL (XML-based User Interface Language) facilities lengthywindowObject.appCore

Leave a Reply