Archive for October, 2007

CD-264 Part VI . Appendixes Listing 16-9 (continued)

Wednesday, October 31st, 2007

CD-264 Part VI . Appendixes Listing 16-9 (continued) // restore window to original dimensions function restore() { window.outerWidth = originalWidth window.outerHeight = originalHeight }

Setting Inner Sizes




Setting Outer Sizes







As the document loads, it saves the current outer dimensions in global variables. One of the buttons restores the windows to these settings. Two parallel sets of buttons set the inner and outer dimensions to the same pixel values so that you can see the effects on the overall window and document area when a script changes the various properties. Because Navigator 4 displays different-looking buttons in different platforms (as well as other elements), the two buttons contain script instructions to size the window to best display the window contents. Unfortunately, no measure of the active area of a document is available, so that the dimension values were determined by trial and error before being hard-wired into the script. windowObject.innerHeight
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.

CD-263Appendix F . Examples from Parts III and (Hosting your own web site)

Wednesday, October 31st, 2007

CD-263Appendix F . Examples from Parts III and IV The last statement in the example shows how to use the array syntax (brackets) to refer to a specific frame. All array indexes start with 0 for the first entry. Because the document asks for the name of the first frame (parent.frames[0]), the response is JustAKid1 for both frames. innerHeight innerWidth outerHeight outerWidth NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility Example In Listing 16-9, a number of buttons let you see the results of setting the innerHeight, innerWidth, outerHeight, and outerWidth properties. Listing 16-9: Setting Window Height and Width Window Sizer Figure 16-5: Property readouts from both frames loaded from Listing 16-7 windowObject.frames
You want to have a cheap webhost for your apache application, then check apache web hosting services.

CD-261Appendix F . (Web hosting ratings) Examples from Parts III and

Tuesday, October 30th, 2007

CD-261Appendix F . Examples from Parts III and IV external.NavigateAndFind( http://www.collegesports.net/scores.html , choice, scores ) } frames NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility Example Listings 16-7 and 16-8 demonstrate how JavaScript treats values of frame references from objects inside a frame. The same document is loaded into each frame. A script in that document extracts info about the current frame and the entire frameset. Figure 16-5 shows the results after loading the HTML document in Listing 16-7. Listing 16-7: Framesetting Document for Listing 16-8 window.frames property A call to determine the number (length) of frames returns 0 from the point of view of the current frame referenced. That s because each frame here is a window that has no nested frames within it. But add the parent property to the reference, and the scope zooms out to take into account all frames generated by the parent window s document. Listing 16-8: Showing Various Window Properties Window Revealer II Continued windowObject.frames
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

CD-260 Part VI . Appendixes (Web hosting domain) Listing 16-6 (continued)

Tuesday, October 30th, 2007

CD-260 Part VI . Appendixes Listing 16-6 (continued)





external NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility Example The first example asks the user if it is okay to add a Web site to the Active Desktop. If Active Desktop is not enabled, the user is given the choice of enabling it at this point. external.AddDesktopComponent( http://www.nytimes.com , website , 200, 100, 400, 400) In the next example, the user is asked to approve the addition of a URL to the Favorites list. The user can follow the normal procedure for filing the item in a folder in the list. external.AddFavorite( http://www.dannyg.com/update6.html , JSBible 4 Support Center ) The final example assumes that a user makes a choice from a SELECT list of items. The onChange event handler of the SELECT list invokes the following function to navigate to a fictitious page and locate listings for a chosen sports team on the page. function locate(list) { var choice = list.options[list.selectedIndex].value windowObject.external
Searching for affordable and proven webhost to host and run your servlet applications? Go to Linux Web Hosting services and you will find it.

Web design conference - CD-259Appendix F . Examples from Parts III and

Monday, October 29th, 2007

CD-259Appendix F . Examples from Parts III and IV As the page loads, it stores the current state of each chrome element. One button for each chrome element triggers the toggleBar() function. This function inverts the visible property for the chrome object passed as a parameter to the function. Finally, the Restore button returns visibility to their original settings. Notice that the restore()function is also called by the onUnloadevent handler for the document. Also, if you load this example into NN6, non-fatal script errors occur when the scrollbars are turned on or off. Listing 16-6: Controlling Window Chrome Bars Bars Bars

Toggle Window Bars


Continued windowObject.directories
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.

CD-258 Part VI . Appendixes dialogLeft dialogTop NN2 (Web hosting control panel)

Monday, October 29th, 2007

CD-258 Part VI . Appendixes dialogLeft dialogTop NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility Example Although usually not a good idea because of the potentially jarring effect on a user, you can reposition a dialog box window that has been resized by script (or by the user if you let the dialog box be resizable). The following statements in a dialog box window document s script recenters the dialog box window. dialogLeft = (screen.availWidth/2) - (parseInt(dialogWidth)/2) + px dialogHeight = (screen.availHeight/2) - (parseInt(dialogHeight)/2) + px Note that the parseInt()functions are used to read the numeric portion of the dialogWidth and dialogHeightproperties so that the values can be used for arithmetic. directories locationbar menubar personalbar scrollbars statusbar toolbar NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility Example In Listing 16-6, you can experiment with the look of a browser window with any of the chrome elements turned on and off. To run this script, you must either sign the scripts or turn on codebase principals (see Chapter 46). Java must also be enabled to use the signed script statements. windowObject.directories
Visit our web design programs services for an affordable and reliable webhost to suit all your needs.

CD-257Appendix F . Examples from Parts III and (Free php web host)

Sunday, October 28th, 2007

CD-257Appendix F . Examples from Parts III and IV dialogArguments NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility Example See Listing 16-38 for the window.showModalDialog()method to see how arguments can be passed to a dialog box and retrieved via the dialogArgumentsproperty. dialogHeight dialogWidth NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility Example Dialog boxes sometimes provide a button or icon that reveals more details or more complex settings for advanced users. You can create a function that handles the toggle between two sizes. The following function assumes that the document in the dialog box has a button whose label also toggles between Show Details and Hide Details. The button s onClickevent handler invokes the function as toggleDetails(this). function toggleDetails(btn) { if (dialogHeight == 200px ) { dialogHeight = 350px btn.value = Hide Details } else { dialogHeight = 200px btn.value = Show Details } } In practice, you also have to toggle the display style sheet property of the extra material between none and block to make sure that the dialog box does not display scrollbars in the smaller dialog box version. windowObject.dialogHeight
Check Tomcat Web Hosting services for best quality webspace to host your web application.

CD-256 Part VI . Appendixes defaultStatus NN2 NN3 (Web design)

Sunday, October 28th, 2007

CD-256 Part VI . Appendixes defaultStatus NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility Example Unless you plan to change the default statusbar text while a user spends time at your Web page, the best time to set the property is when the document loads. In Listing 16-5, notice how I also read this property to reset the statusbar in an onMouseOut event handler. Setting the status property to empty also resets the statusbar to the defaultStatus setting. Listing 16-5: Setting the Default Status Message window.defaultStatus property Microsoft

Netscape If you need to display single or double quotes in the statusbar (as in the second link in Listing 16-5), use escape characters ( and ) as part of the strings being assigned to these properties. windowObject.defaultStatus
From our experience, we are can tell you that you can find a reliable and cheap webhost service at Java Web Hosting services.

CD-255Appendix F . Examples from Parts III and (Http web server)

Saturday, October 27th, 2007

CD-255Appendix F . Examples from Parts III and IV var newWind // set flag to help out with special handling for window closing var isIE3 = (navigator.appVersion.indexOf( MSIE 3 ) != -1) ? true : false // make the new window and put some stuff in it function newWindow() { newWind = window.open( , subwindow , HEIGHT=200,WIDTH=200 ) // take care of Navigator 2 if (newWind.opener == null) { newWind.opener = window } setTimeout( finishNewWindow() , 100) } function finishNewWindow() { var output = output +=

A Sub-window

output += newWind.document.write(output) newWind.document.close() } // close subwindow, including ugly workaround for IE3 function closeWindow() { if (isIE3) { // if window is already open, nothing appears to happen // but if not, the subwindow flashes momentarily (yech!) newWind = window.open( , subwindow , HEIGHT=200,WIDTH=200 ) } if (newWind && !newWind.closed) { newWind.close() } }

To complete the example of the window opening and closing, notice that the sub- window is given a button whose onClickevent handler closes the main window. In Navigator 2 and Internet Explorer 3, this occurs without complaint. But in NN3+ and IE4+, the user is presented with an alert asking to confirm the closure of the main browser window. windowObject.closed
Go visit our java server pages services for a reliable, lowcost webhost to satisfy all your needs.