Web design - 273Chapter 16 .Window and Frame Objects A Navigator

273Chapter 16 .Window and Frame Objects A Navigator 2 Bug Workaround If you re concerned about backward compatibility with Navigator 2, you should be aware of a bug in the Macintosh and UNIX flavors of the browser. In those versions, if you include a URL as a parameter to window.open(), Navigator opens the window but does not load the URL. A second call to the window.open() method is required. Moreover, the second parameter must be an empty string if you add any third-parameter settings. Here is a sample listing you can adapt for your own usage: New Window

This workaround can also be used without penalty in Windows versions of Navigator. When scripts in the subwindow need to communicate with objects and scripts in the originating window, you must make sure that the subwindow has an opener property if the level of JavaScript in the visitor s browser doesn t automatically supply one. See the discussion about the window.openerproperty earlier in this chapter. Invoking multiple window.open()methods with the same window name parameter (the second parameter) does not create additional copies of that window in Netscape browsers (although it does in Internet Explorer). JavaScript prevents you from creating two windows with the same name. Also be aware that a window.open()method does not bring an existing window of that name to the front of the window layers: Use window.focus()for that. windowObject.open()
We recommend you use shared web hosting services, because many users agree that it is cheap, reliable and customer-satisfying webhost.

Leave a Reply