Web hosting plans - 274 Part III . Document Objects Reference Internet

274 Part III . Document Objects Reference Internet Explorer idiosyncracies Creating subwindows in IE can be complicated at times by undesirable behavior by the browser. One of the most common problems occurs when you attempt to use document.write()to put content into a newly created window. IE, including some of the latest versions, fails to complete the window opening job before the script statement that uses document.write() executes. This causes a script error because the reference to the subwindow is not yet valid. To work around this, you should put the HTML assembly and document.write() statements in a separate function that gets invoked via a setTimeout()method after the window is created. You can see an example of this in Listing 16-26. Another problem that affects IE is the occasional security violation ( access denied ) warning when a script attempts to access a subwindow. This problem goes away when the page that includes the script for opening and accessing the subwindow is served from an http server, rather than accessed from a local hard disk. Finally, an all-too common bug in Windows 95/98 allows the Registry to become mildly corrupted in some key areas that IE needs for opening and referencing new windows. The most common symptom of the problem is a script error on the statement that invokes window.open(), but other indications include error messages that the document.write() method is not supported in the subwindow or that the RPC server is not available. The problem cannot be fixed by JavaScript but requires human intervention on the affected PC. Here are the steps to repair the problem: 1. Click Start and then click Run. 2. In the Open box, type the following line: regsvr32 actxprxy.dll 3. Click OK and then click OK again after you receive the following message: DllRegisterServer in actxprxy.dll succeeded. 4. Click Start and then click Run. 5. In the Open box, type the following line: regsvr32 shdocvw.dll 6. Click OK and then click OK again after you receive the following message: DllRegisterServer in shdocvw.dll succeeded. 7. Shut down and restart your computer. The corruption is reported to be caused by application installers and uninstallers that don t clean up after themselves the way they should. The fact that this problem is rather common in IE4 under both Windows 95 and 98 might make you gun-shy about utilizing multiple windows in your application. On the CD-ROM Example (with Listing 16-26) on the CD-ROM Related Items: window.close(), window.blur(), window.focus() methods; window.closed property. 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