276 Part III (Web hosting services) . Document Objects Reference While
Sunday, November 25th, 2007276 Part III . Document Objects Reference While there is no known workaround for resurrecting modified content, your script can at least know if the page is being loaded into one of these hidden win dows: The NN-specific window.outerHeightand window.outerWidth properties are zero. If you don t want an immediate script statement to run before being printed, use an ifconstruction to let the nested statement(s) run only if either of those dimension properties is greater than zero. Printing in IE4 While the window.print() method is not available in IE4, it is possible to script printing in the Win32 OS platforms via the built-in browser object. To use this ActiveX object, you must first include the following HTML somewhere in your document (at the end of the BODY is fine): The long CLASSIDattribute must be copied exactly. This HTML adds an object to the document object model that can be scripted. The object has several commands available, one of which provides printing services. The commands are numbered, and the one for printing is the following: IEControl.ExecWB(6, 1) If the user cancels the Print dialog box, a script error may appear, so be sure to trap for errors (see the window.onerrorproperty earlier in this chapter). If you change the second parameter to 2, the Print dialog box does not appear, but that isn t a very user-friendly way to treat printing. Related Items: window.back(), window.forward(), window.home(), window.find() methods. prompt( message , defaultReply ) Returns: String of text entered by user or null. NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility . . . The third kind of dialog box that JavaScript can display includes a message from the script author, a field for user entry, and two buttons (OK and Cancel, or Yes and No on Mac versions of Navigator 2 and 3). The script writer can supply a prewritten answer so that a user confronted with a prompt dialog box can click OK (or press Enter) to accept that answer without further typing. Supplying both parameters to the window.prompt()method is important. Even if you don t want to supply a default answer, enter an empty string as the second parameter: prompt( What is your postal code? , ) If you omit the second parameter, JavaScript inserts the string undefined into the dialog box s field. This string is disconcerting to most Web page visitors. windowObject.prompt()
From our experience, we can recommend PHP5 Web Hosting services, if you need affordable webhost to host and run your web application.