<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.4" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>Java Server Pages, Java Programming - Cheap Web Hosting Blog</title>
	<link>http://tomcat.jspwebsitehosting.com</link>
	<description>Fine blog on PHP, Tomcat and SSH web site hosting reviews</description>
	<pubDate>Thu, 14 Feb 2008 03:18:53 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.4</generator>
	<language>en</language>
			<item>
		<title>388Part IIIDocument Objects ReferenceListing 16-10(continued) //  (Web site templates) turn on</title>
		<link>http://tomcat.jspwebsitehosting.com/tomcat/388part-iiidocument-objects-referencelisting-16-10continued-web-site-templates-turn-on/</link>
		<comments>http://tomcat.jspwebsitehosting.com/tomcat/388part-iiidocument-objects-referencelisting-16-10continued-web-site-templates-turn-on/#comments</comments>
		<pubDate>Thu, 14 Feb 2008 03:18:53 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Tomcat</category>
		<guid isPermaLink="false">http://tomcat.jspwebsitehosting.com/tomcat/388part-iiidocument-objects-referencelisting-16-10continued-web-site-templates-turn-on/</guid>
		<description><![CDATA[388Part IIIDocument Objects ReferenceListing 16-10(continued) // turn on error dialogs with hard reloadfunction errOn() { window.onerror = handleError; } // assign default error handlerwindow.onerror = handleError; // error handler when errors are turned off&#8230;prevents error dialogfunction doNothing() { return true; } function handleError(msg, URL, lineNum) { var errWind = window.open(  , errors , height=270,width=400 [...]]]></description>
			<content:encoded><![CDATA[<p>388Part IIIDocument Objects ReferenceListing 16-10(continued) // turn on error dialogs with hard reloadfunction errOn() { window.onerror = handleError; } // assign default error handlerwindow.onerror = handleError; // error handler when errors are turned off&#8230;prevents error dialogfunction doNothing() { return true; } function handleError(msg, URL, lineNum) { var errWind = window.open(  , errors , height=270,width=400 ); var wintxt =  <html><body bgcolor=red> ; wintxt +=  <b>An error has occurred on this page. Please report it to  Tech Support.</b> ; wintxt +=<br />
<form method=POST enctype= text/plain   action=mailTo:support4@dannyg.com > ; wintxt +=  <textarea name= errMsg  cols=45 rows=8 wrap=VIRTUAL> ; wintxt +=  Error:   + msg +  n ; wintxt +=  URL:   + URL +  n ; wintxt +=  Line:   + lineNum +  n ; wintxt +=  Client:   + navigator.userAgent +  n ; wintxt +=  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;n ; wintxt +=  Please describe what you were doing when the error  occurred: ; wintxt +=  </textarea><br /> ; wintxt +=  <input type=SUBMIT value= Send Error Report > ; wintxt +=  <input type=button value= Close  onclick= self.close() > ; wintxt +=  </form>
<p></body></html> ; errWind.document.write(wintxt); errWind.document.close(); return true; } </script> </head> <body><br />
<form name= myform > <input type= button  value= Cause an Error  onclick= goWrong()  />
<p><input type= button  value= Turn Off Error Dialogs  onclick= errOff()  /> <input type= button
</p>
]]></content:encoded>
			<wfw:commentRSS>http://tomcat.jspwebsitehosting.com/tomcat/388part-iiidocument-objects-referencelisting-16-10continued-web-site-templates-turn-on/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>387Chapter 16Window and Frame ObjectsWhen the browser starts,  (Web hosting comparison)</title>
		<link>http://tomcat.jspwebsitehosting.com/tomcat/387chapter-16window-and-frame-objectswhen-the-browser-starts-web-hosting-comparison/</link>
		<comments>http://tomcat.jspwebsitehosting.com/tomcat/387chapter-16window-and-frame-objectswhen-the-browser-starts-web-hosting-comparison/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 10:19:53 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Tomcat</category>
		<guid isPermaLink="false">http://tomcat.jspwebsitehosting.com/tomcat/387chapter-16window-and-frame-objectswhen-the-browser-starts-web-hosting-comparison/</guid>
		<description><![CDATA[387Chapter 16Window and Frame ObjectsWhen the browser starts, the window.onerrorproperty is . In this state, allerrors are reported via the normal JavaScript error window or message. To turn off erroralerts, set the window.onerrorproperty to invoke a function that does absolutely nothing: function doNothing() { return true; } window.onerror = doNothing; To restore the error messages, [...]]]></description>
			<content:encoded><![CDATA[<p>387Chapter 16Window and Frame ObjectsWhen the browser starts, the window.onerrorproperty is <undefined>. In this state, allerrors are reported via the normal JavaScript error window or message. To turn off erroralerts, set the window.onerrorproperty to invoke a function that does absolutely nothing: function doNothing() { return true; } window.onerror = doNothing; To restore the error messages, reload the page.  You can, however, also assign a custom function to the window.onerrorproperty. This func- tion then handles errors in a more friendly way under your script control. Whenever errormessages are turned on (the default behavior), a script error (or Java applet or class excep- tion) invokes the function assigned to the onerrorproperty, passing three parameters: .Error message .URL of document causing the error .Line number of the errorYou can essentially trap for all errors and handle them with your own interface (or no usernotification at all). The last statement of this function must be return trueif you do notwant the JavaScript script error message to appear. If you are using LiveConnect to communicate with a Java applet directly from your scripts, you can use the same scheme to handle any exception that Java may throw. A Java exceptionis not necessarily a mistake kind of error: Some methods assume that the Java code will trapfor exceptions to handle special cases (for example, reacting to a user s denial of access whenprompted by a signed script dialog box). See Chapter 44 on the CD-ROM for an example oftrapping for a specific Java exception. Also, see Chapter 31 for JavaScript exception handlingintroduced for W3C DOM compatible browsers. ExampleIn Listing 16-10, one button triggers a script that contains an error. I ve added an error han- dling function to process the error so that it opens a separate window and fills in a textareaform element (see Figure 16-5). A Submit button is also provided to mail the bug informationto a support center e-mail address an example of how to handle the occurrence of a bug inyour scripts. Listing 16-10:Controlling Script Errors<html> <head>  <script type= text/javascript > // function with invalid variable valuefunction goWrong() { var x = fred; } // turn off error dialogsfunction errOff() { window.onerror = doNothing; } Continued  windowObject.onerror
</p>
]]></content:encoded>
			<wfw:commentRSS>http://tomcat.jspwebsitehosting.com/tomcat/387chapter-16window-and-frame-objectswhen-the-browser-starts-web-hosting-comparison/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Christian web host - 386Part IIIDocument Objects ReferenceoffscreenBufferingValue:Boolean or string.Read/WriteCompatibility:WinIE4+, MacIE4+, NN-,</title>
		<link>http://tomcat.jspwebsitehosting.com/tomcat/christian-web-host-386part-iiidocument-objects-referenceoffscreenbufferingvalueboolean-or-stringreadwritecompatibilitywinie4-macie4-nn/</link>
		<comments>http://tomcat.jspwebsitehosting.com/tomcat/christian-web-host-386part-iiidocument-objects-referenceoffscreenbufferingvalueboolean-or-stringreadwritecompatibilitywinie4-macie4-nn/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 17:28:59 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Tomcat</category>
		<guid isPermaLink="false">http://tomcat.jspwebsitehosting.com/tomcat/christian-web-host-386part-iiidocument-objects-referenceoffscreenbufferingvalueboolean-or-stringreadwritecompatibilitywinie4-macie4-nn/</guid>
		<description><![CDATA[386Part IIIDocument Objects ReferenceoffscreenBufferingValue:Boolean or string.Read/WriteCompatibility:WinIE4+, MacIE4+, NN-, Moz-, Safari- IE4+ by default initially renders a page in a buffer (a chunk of memory) before it is blasted tothe video screen. You can control this behavior explicitly by modifying thewindow.offscreenBufferingproperty. The default value of the property is the string auto. You can also assign Boolean [...]]]></description>
			<content:encoded><![CDATA[<p>386Part IIIDocument Objects ReferenceoffscreenBufferingValue:Boolean or string.Read/WriteCompatibility:WinIE4+, MacIE4+, NN-, Moz-, Safari- IE4+ by default initially renders a page in a buffer (a chunk of memory) before it is blasted tothe video screen. You can control this behavior explicitly by modifying thewindow.offscreenBufferingproperty. The default value of the property is the string auto. You can also assign Boolean trueorfalseto the property to override IE s normal automatic handling of this behavior. ExampleIf you want to turn off buffering for an entire page, include the following statement at thebeginning of your script statements: window.offscreenBuffering = false; onerrorValue:Function. Read/WriteCompatibility:WinIE4+, MacIE4+, NN3+, Moz1+, Safari- The onerrorproperty is an exception to the rule of this book to not describe event handlersas properties within object reference sections. The reason is that the onerrorevent bringsalong some special properties that are useful to control by setting the event handler propertyin scripts. Recent browsers (IE5+, NN4+, and W3C) are designed to prevent script errors from beingintrusive if a user encounters a script error while loading or interacting with a page. Even so, even the subtle hints about problems (messages or icons in the status bar) can be confusingfor users who have no idea what JavaScript is. JavaScript lets you turn off the display ofscript error windows or messages as someone executes a script on your page. The questionis: When should you turn off these messages? Script errors generally mean that something is wrong with your script. The error may be theresult of a coding mistake or, conceivably, a bug in JavaScript (perhaps on a platform versionof the browser that you haven t been able to test). If such errors occur, often the script won tcontinue to do what you intended. Hiding the script error from yourself during developmentwould be foolhardy, because you d never know whether unseen errors are lurking in yourcode. It can be equally dangerous to turn off error dialog boxes for users who may believethat the page is operating normally, when, in fact, it s not. Some data values may not be calcu- lated or displayed correctly. That said, I can see some limited instances of when you may want to keep such dialog boxwindows from appearing. For example, if you know for a fact that a platform-specific bug tripsthe error message without harming the execution of the script, you may want to prevent thaterror alert dialog box from appearing in the files posted to your Web site. You should do thisonly after extensive testing to ensure that the script ultimately behaves correctly, even withthe bug or error. IE fires the onerrorevent handler only for runtime errors. This means that if you have a  syntactical error in your script that trips the browser as the page loads, the onerroreventdoesn t fire, and you cannot trap that error message. Moreover, if the user has the IE scriptdebugger installed, any code you use to prevent browser error messages from appearing willnot work. NotewindowObject.offscreenBuffering
</p>
]]></content:encoded>
			<wfw:commentRSS>http://tomcat.jspwebsitehosting.com/tomcat/christian-web-host-386part-iiidocument-objects-referenceoffscreenbufferingvalueboolean-or-stringreadwritecompatibilitywinie4-macie4-nn/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Web server - 385Chapter 16Window and Frame ObjectslocationValue:Object.Read/WriteCompatibility:WinIE3+, MacIE3+, NN2+, Moz1+,</title>
		<link>http://tomcat.jspwebsitehosting.com/tomcat/web-server-385chapter-16window-and-frame-objectslocationvalueobjectreadwritecompatibilitywinie3-macie3-nn2-moz1/</link>
		<comments>http://tomcat.jspwebsitehosting.com/tomcat/web-server-385chapter-16window-and-frame-objectslocationvalueobjectreadwritecompatibilitywinie3-macie3-nn2-moz1/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 02:26:43 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Tomcat</category>
		<guid isPermaLink="false">http://tomcat.jspwebsitehosting.com/tomcat/web-server-385chapter-16window-and-frame-objectslocationvalueobjectreadwritecompatibilitywinie3-macie3-nn2-moz1/</guid>
		<description><![CDATA[385Chapter 16Window and Frame ObjectslocationValue:Object.Read/WriteCompatibility:WinIE3+, MacIE3+, NN2+, Moz1+, Safari1+ (See the discussion of the locationobject in Chapter 17.) locationbar(See directories) nameValue:String.Read/WriteCompatibility:WinIE3+, MacIE3+, NN2+, Moz1+, Safari1+ All windowobjects can have names assigned to them. Names are particularly useful for work- ing with frames, because a good naming scheme for a multiframe environment can help youdetermine precisely [...]]]></description>
			<content:encoded><![CDATA[<p>385Chapter 16Window and Frame ObjectslocationValue:Object.Read/WriteCompatibility:WinIE3+, MacIE3+, NN2+, Moz1+, Safari1+ (See the discussion of the locationobject in Chapter 17.) locationbar(See directories) nameValue:String.Read/WriteCompatibility:WinIE3+, MacIE3+, NN2+, Moz1+, Safari1+ All windowobjects can have names assigned to them. Names are particularly useful for work- ing with frames, because a good naming scheme for a multiframe environment can help youdetermine precisely which frame you re working with in references coming from other frames. The main browser window, however, has no name attached to it by default. Its value is anempty string. There aren t many reasons to assign a name to the window, because JavaScriptand HTML provide plenty of other ways to refer to the windowobject (the topproperty, the_topconstant for targetattributes, and the openerproperty from subwindows). If you want to attach a name to the main window, you can do so by setting the window.nameproperty at any time. But be aware that because this is one window property whose lifeextends beyond the loading and unloading of any given document, chances are that yourscripts would use the reference in only one document or frameset. Unless you restore thedefault empty string, your programmed window name will be present for any other documentthat loads later. My suggestion in this regard is to assign a name in a window s or frameset sonloadevent handler, and then reset it to empty in a corresponding onunloadevent handler: <body onload= self.name =  Main   onunload= self.name =    > You can see an example of this application in Listing 16-16, where setting a parent windowname is helpful for learning the relationships among parent and child windows. Related Items:topproperty; window.open(), window.sizeToContent()methods. navigatorValue:Object.Read-OnlyCompatibility:WinIE4+, MacIE4+, NN6+, Moz1+, Safari1+ Although the navigatorobject appears as a property of the windowobject only in the mostrecent browsers, the navigatorobject has been around since the very beginning (seeChapter 38 on the CD-ROM). In previous browsers, the navigatorobject was referenced as astandalone object. And because you can omit any reference to the windowobject for a win- dowobject s properties, you can use the same window-less reference syntax for compatibilityacross all scriptable browsers (at least for the navigatorobject properties that exist acrossall browsers). That s the way I recommend referring to the navigatorobject. ExampleThis book is littered with examples of using the navigatorobject, primarily for performingbrowser detection. You can find examples of specific navigatorobject properties in Chapter38 on the CD-ROM. Related Items:navigatorobject. windowObject.navigator
</p>
]]></content:encoded>
			<wfw:commentRSS>http://tomcat.jspwebsitehosting.com/tomcat/web-server-385chapter-16window-and-frame-objectslocationvalueobjectreadwritecompatibilitywinie3-macie3-nn2-moz1/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>384Part IIIDocument Objects ReferenceListing 16-9(continued) function setInner(width, height)  (Web hosting india)</title>
		<link>http://tomcat.jspwebsitehosting.com/tomcat/384part-iiidocument-objects-referencelisting-16-9continued-function-setinnerwidth-height-web-hosting-india/</link>
		<comments>http://tomcat.jspwebsitehosting.com/tomcat/384part-iiidocument-objects-referencelisting-16-9continued-function-setinnerwidth-height-web-hosting-india/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 11:23:55 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Tomcat</category>
		<guid isPermaLink="false">http://tomcat.jspwebsitehosting.com/tomcat/384part-iiidocument-objects-referencelisting-16-9continued-function-setinnerwidth-height-web-hosting-india/</guid>
		<description><![CDATA[384Part IIIDocument Objects ReferenceListing 16-9(continued) function setInner(width, height) { window.innerWidth = width; window.innerHeight = height; } // generic function to set outer dimensionsfunction setOuter(width, height) { window.outerWidth = width; window.outerHeight = height; } // restore window to original dimensionsfunction restore() { window.outerWidth = originalWidth; window.outerHeight = originalHeight; }   
 Setting Inner Sizes  [...]]]></description>
			<content:encoded><![CDATA[<p>384Part IIIDocument Objects ReferenceListing 16-9(continued) function setInner(width, height) { window.innerWidth = width; window.innerHeight = height; } // generic function to set outer dimensionsfunction setOuter(width, height) { window.outerWidth = width; window.outerHeight = height; } // restore window to original dimensionsfunction restore() { window.outerWidth = originalWidth; window.outerHeight = originalHeight; } </script> </head> <body><br />
<form> <b>Setting Inner Sizes</b><br /> <input type= button  value= 600 Pixels Square  onclick= setInner(600,600)  /><br /> <input type= button  value= 300 Pixels Square  onclick= setInner(300,300)  /><br /> <input type= button  value= Available Screen Space  onclick= setInner(screen.availWidth, screen.availHeight)  /><br /> <hr /> <b>Setting Outer Sizes</b><br /> <input type= button  value= 600 Pixels Square  onclick= setOuter(600,600)  /><br /> <input type= button  value= 300 Pixels Square  onclick= setOuter(300,300)  /><br /> <input type= button  value= Available Screen Space  onclick= setOuter(screen.availWidth, screen.availHeight)  /><br /> <hr /> <input type= button  value= Cinch up for Win95  onclick= setInner(273,304)  /><br /> <input type= button  value= Cinch up for Mac  onclick= setInner(273,304)  /><br /> <input type= button  value= Restore Original  onclick= restore()  /><br /> </form>
<p> </body> </html> Related Items:window.resizeTo(), window.moveTo()methods; screenobject; navigatorobject. loadingValue:Boolean.Read-OnlyCompatibility:WinIE-, MacIE-, NN4, Moz-, Safari- This NN4-specific property allows you to query whether the window is still loading content. The property returns trueif the page is still loading and falseif the page has completedloading all of its content. windowObject.innerHeight
</p>
]]></content:encoded>
			<wfw:commentRSS>http://tomcat.jspwebsitehosting.com/tomcat/384part-iiidocument-objects-referencelisting-16-9continued-function-setinnerwidth-height-web-hosting-india/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>383Chapter 16Window and Frame ObjectsSupporting browsers provide two  (Vps web hosting)</title>
		<link>http://tomcat.jspwebsitehosting.com/tomcat/383chapter-16window-and-frame-objectssupporting-browsers-provide-two-vps-web-hosting/</link>
		<comments>http://tomcat.jspwebsitehosting.com/tomcat/383chapter-16window-and-frame-objectssupporting-browsers-provide-two-vps-web-hosting/#comments</comments>
		<pubDate>Sun, 10 Feb 2008 18:13:13 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Tomcat</category>
		<guid isPermaLink="false">http://tomcat.jspwebsitehosting.com/tomcat/383chapter-16window-and-frame-objectssupporting-browsers-provide-two-vps-web-hosting/</guid>
		<description><![CDATA[383Chapter 16Window and Frame ObjectsSupporting browsers provide two different points of reference for measuring the height andwidth of a window: inner and outer. Both are measured in pixels. The inner measurements arethat of the active document area of a window (sometimes known as a window s contentregion). If the optimum display of your document depends [...]]]></description>
			<content:encoded><![CDATA[<p>383Chapter 16Window and Frame ObjectsSupporting browsers provide two different points of reference for measuring the height andwidth of a window: inner and outer. Both are measured in pixels. The inner measurements arethat of the active document area of a window (sometimes known as a window s contentregion). If the optimum display of your document depends on the document display areabeing a certain number of pixels high and/or wide, the innerHeightand innerWidthproper- ties are the ones to set. In contrast, the outer measurements are of the outside boundary of the entire window, includ- ing whatever chrome is showing in the window: scroll bars, status bar, and so on. Setting theouterHeightand outerWidthis generally done in concert with a reading of screenobjectproperties (see Chapter 38 on the CD-ROM). Perhaps the most common usage of the outerproperties is to set the browser window to fill the available screen area of the visitor s monitor. A more efficient way of modifying both outer dimensions of a window is with thewindow.resizeTo()method, which is also available in IE4+. The method takes pixel widthand height (as integer values) as parameters, thus accomplishing a window resizing in onestatement. Be aware that resizing a window does not adjust the location of a window. Therefore, just because you set the outer dimensions of a window to the available spacereturned by the screenobject doesn t mean that the window will suddenly fill the availablespace on the monitor. Application of the window.moveTo()method is necessary to ensurethe top-left corner of the window is at screen coordinates 0,0. Despite the freedom that these properties afford the page author, Netscape and Mozilla-basedbrowsers have built in a minimum size limitation for scripts that are not cryptographicallysigned. You cannot set these properties such that the outer height and width of the window issmaller than 100 pixels on a side. This limitation is to prevent an unsigned script from settingup a small or nearly invisible window that monitors activity in other windows. With signedscripts, however, windows can be made smaller than 100  100 pixels with the user s permis- sion. IE4+ maintains a smaller minimum size to prevent resizing a window to zero size. Users may dislike your scripts messing with their browser window sizes and positions. NN7+/Moz1+/Safari do not allow scripts to resize windows. ExampleIn Listing 16-9, a number of buttons let you see the results of setting the innerHeight, innerWidth, outerHeight, and outerWidthproperties in NN4 and NN6. Later browsers andSafari ignore scripted adjustments to these properties. Listing 16-9:Setting Window Height and Width<html> <head>  <script type= text/javascript > // store original outer dimensions as page loadsvar originalWidth = window.outerWidth; var originalHeight = window.outerHeight; // generic function to set inner dimensionsContinuedCautionwindowObject.innerHeight
</p>
]]></content:encoded>
			<wfw:commentRSS>http://tomcat.jspwebsitehosting.com/tomcat/383chapter-16window-and-frame-objectssupporting-browsers-provide-two-vps-web-hosting/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>382Part IIIDocument Objects ReferenceFigure 16-4:Property readouts from both  (Web server)</title>
		<link>http://tomcat.jspwebsitehosting.com/tomcat/382part-iiidocument-objects-referencefigure-16-4property-readouts-from-both-web-server/</link>
		<comments>http://tomcat.jspwebsitehosting.com/tomcat/382part-iiidocument-objects-referencefigure-16-4property-readouts-from-both-web-server/#comments</comments>
		<pubDate>Sun, 10 Feb 2008 01:07:37 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Tomcat</category>
		<guid isPermaLink="false">http://tomcat.jspwebsitehosting.com/tomcat/382part-iiidocument-objects-referencefigure-16-4property-readouts-from-both-web-server/</guid>
		<description><![CDATA[382Part IIIDocument Objects ReferenceFigure 16-4:Property readouts from both frames loaded from Listing 16-7. historyValue:Object.Read-OnlyCompatibility:WinIE3+, MacIE3+, NN2+, Moz1+, Safari1+ (See the discussion of the historyobject in Chapter 17.) innerHeightinnerWidthouterHeightouterWidthValue:Integer.Read/Write (see text) Compatibility:WinIE-, MacIE-, NN4+, Moz1+, Safari1+ NN4+ lets scripts adjust the height and width of any window, including the main browserwindow by setting properties. This adjustment [...]]]></description>
			<content:encoded><![CDATA[<p>382Part IIIDocument Objects ReferenceFigure 16-4:Property readouts from both frames loaded from Listing 16-7. historyValue:Object.Read-OnlyCompatibility:WinIE3+, MacIE3+, NN2+, Moz1+, Safari1+ (See the discussion of the historyobject in Chapter 17.) innerHeightinnerWidthouterHeightouterWidthValue:Integer.Read/Write (see text) Compatibility:WinIE-, MacIE-, NN4+, Moz1+, Safari1+ NN4+ lets scripts adjust the height and width of any window, including the main browserwindow by setting properties. This adjustment can be helpful when your page shows itselfbest with the browser window sized to a particular height and width. Rather than relyingonthe user to size the browser window for optimum viewing of your page, you can dictatethe size of the window (although the user can always manually resize the main window). Andbecause you can examine the operating system of the visitor via the navigatorobject(seeChapter 38 on the CD-ROM), you can size a window to adjust for the differences in fontand form element rendering on different platforms. windowObject.history
</p>
]]></content:encoded>
			<wfw:commentRSS>http://tomcat.jspwebsitehosting.com/tomcat/382part-iiidocument-objects-referencefigure-16-4property-readouts-from-both-web-server/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>381Chapter 16Window and Frame ObjectsListing 16-7:Framesetting Document for  (Web site translator)</title>
		<link>http://tomcat.jspwebsitehosting.com/tomcat/381chapter-16window-and-frame-objectslisting-16-7framesetting-document-for-web-site-translator/</link>
		<comments>http://tomcat.jspwebsitehosting.com/tomcat/381chapter-16window-and-frame-objectslisting-16-7framesetting-document-for-web-site-translator/#comments</comments>
		<pubDate>Sat, 09 Feb 2008 09:11:21 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Tomcat</category>
		<guid isPermaLink="false">http://tomcat.jspwebsitehosting.com/tomcat/381chapter-16window-and-frame-objectslisting-16-7framesetting-document-for-web-site-translator/</guid>
		<description><![CDATA[381Chapter 16Window and Frame ObjectsListing 16-7:Framesetting Document for Listing 16-8         A call to determine the number (length) of frames returns 0 from the point of view of the cur- rent frame referenced. That s because each frame here is a window that has no nested frameswithin it. [...]]]></description>
			<content:encoded><![CDATA[<p>381Chapter 16Window and Frame ObjectsListing 16-7:Framesetting Document for Listing 16-8<html> <head>  </head> <frameset cols= 50%,50% > <frame name= JustAKid1  src= lst16-08.htm  /> <frame name= JustAKid2  src= lst16-08.htm  /> </frameset> </html> A call to determine the number (length) of frames returns 0 from the point of view of the cur- rent frame referenced. That s because each frame here is a window that has no nested frameswithin it. But add the parentproperty to the reference, and the scope zooms out to take intoaccount all frames generated by the parent window s document. Listing 16-8:Showing Various Window Properties<html> <head>  <script type= text/javascript > function gatherWindowData() { var msg =   ; msg +=
<p><b>From the point of view of this frame:</b><br /> ; msg +=  window.frames.length:   + window.frames.length +  <br /> ; msg +=  window.name:   + window.name +  </p>
<p> ; msg +=
<p><b>From the point of view of the framesetting  document:</b><br /> ; msg +=  parent.frames.length:   + parent.frames.length +  <br /> ; msg +=  parent.frames[0].name:   + parent.frames[0].name +  </p>
<p> ; return msg; } </script> </head> <body> <script type= text/javascript > document.write(gatherWindowData()); </script> </body> </html> The last statement in the example shows how to use the array syntax (brackets) to refer to aspecific frame. All array indexes start with 0 for the first entry. Because the document asksfor the name of the first frame (parent.frames[0]), the response is JustAKid1for bothframes. Related Items:frame, framesetobjects; window.parent, window.topproperties. windowObject.frames
</p>
]]></content:encoded>
			<wfw:commentRSS>http://tomcat.jspwebsitehosting.com/tomcat/381chapter-16window-and-frame-objectslisting-16-7framesetting-document-for-web-site-translator/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Medical web site - 380Part IIIDocument Objects ReferenceTo use the framesproperty to</title>
		<link>http://tomcat.jspwebsitehosting.com/tomcat/medical-web-site-380part-iiidocument-objects-referenceto-use-the-framesproperty-to/</link>
		<comments>http://tomcat.jspwebsitehosting.com/tomcat/medical-web-site-380part-iiidocument-objects-referenceto-use-the-framesproperty-to/#comments</comments>
		<pubDate>Fri, 08 Feb 2008 17:19:35 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Tomcat</category>
		<guid isPermaLink="false">http://tomcat.jspwebsitehosting.com/tomcat/medical-web-site-380part-iiidocument-objects-referenceto-use-the-framesproperty-to/</guid>
		<description><![CDATA[380Part IIIDocument Objects ReferenceTo use the framesproperty to communicate from one frame to another, it should be part of areference that begins with the parentor topproperty. This lets JavaScript make the properjourney through the hierarchy of all currently loaded objects to reach the desired object. Tofind out how many frames are currently active in a [...]]]></description>
			<content:encoded><![CDATA[<p>380Part IIIDocument Objects ReferenceTo use the framesproperty to communicate from one frame to another, it should be part of areference that begins with the parentor topproperty. This lets JavaScript make the properjourney through the hierarchy of all currently loaded objects to reach the desired object. Tofind out how many frames are currently active in a window, use this expression: parent.frames.lengthThis expression returns a number indicating how many frames the parent window defines. This value does not, however, count further nested frames, should a third generation of framebe defined in the environment. In other words, no single property exists that you can use todetermine the total number of frames in the browser window if multiple generations offrames are present. The browser stores information about all visible frames in a numbered (indexed) array, withthe first frame (that is, the topmost <frame>tag defined in the framesetting document) asnumber 0: parent.frames[0] Therefore, if the window shows three frames (whose indexes are frames[0], frames[1], andframes[2], respectively), the reference for retrieving the titleproperty of the document inthe second frame isparent.frames[1].document.titleThis reference is a road map that starts at the parent window and extends to the secondframe s document and its titleproperty. Other than the number of frames defined in a par- ent window and each frame s name (top.frames[i].name), no other values from the framedefinitions are directly available from the frame object via scripting until you get to IE4 andNN6/W3C (see the frameelement object later in this chapter). In these browsers, individualframeelement objects have several properties that reveal <frame>tag attributes. Using index values for frame references is not always the safest tactic, however, becauseyourframeset design may change over time, in which case the index values will also change. Instead, you should take advantage of the nameattribute of the <frame>tag, and assign aunique, descriptive name to each frame. A value you assign to the nameattribute is also thename that you use for targetattributes of links to force a linked page to load in a frameother than the one containing the link. You can use a frame s name as an alternative to theindexed reference. For example, in Listing 16-7, two frames are assigned distinctive names. Toaccess the title of a document in the JustAKid2frame, the complete object reference isparent.JustAKid2.document.titlewith the frame name (case-sensitive) substituting for the frames[1]array reference. Or, inkeeping with JavaScript flexibility, you can use the object name in the array index position: parent.frames[ JustAKid2 ].document.titleThe supreme advantage to using frame names in references is that no matter how the frame- set structure may change over time, a reference to a named frame will always find that frame, although its index value (that is, position in the frameset) may change. ExampleListings 16-7 and 16-8 demonstrate how JavaScript treats values of frame references fromobjects inside a frame. The same document is loaded into each frame. A script in that docu- ment extracts information about the current frame and the entire frameset. Figure 16-4 showsthe results after loading the HTML document in Listing 16-7. windowObject.frames
</p>
]]></content:encoded>
			<wfw:commentRSS>http://tomcat.jspwebsitehosting.com/tomcat/medical-web-site-380part-iiidocument-objects-referenceto-use-the-framesproperty-to/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>379Chapter 16Window and Frame ObjectsExampleThe  (Space web hosting) first example asks</title>
		<link>http://tomcat.jspwebsitehosting.com/tomcat/379chapter-16window-and-frame-objectsexamplethe-space-web-hosting-first-example-asks/</link>
		<comments>http://tomcat.jspwebsitehosting.com/tomcat/379chapter-16window-and-frame-objectsexamplethe-space-web-hosting-first-example-asks/#comments</comments>
		<pubDate>Thu, 07 Feb 2008 11:03:00 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Tomcat</category>
		<guid isPermaLink="false">http://tomcat.jspwebsitehosting.com/tomcat/379chapter-16window-and-frame-objectsexamplethe-space-web-hosting-first-example-asks/</guid>
		<description><![CDATA[379Chapter 16Window and Frame ObjectsExampleThe first example asks the user if it is okay to add a Web site to the Active Desktop. If ActiveDesktop 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 [...]]]></description>
			<content:encoded><![CDATA[<p>379Chapter 16Window and Frame ObjectsExampleThe first example asks the user if it is okay to add a Web site to the Active Desktop. If ActiveDesktop 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/update11.html ,  JSBible 5 Support Center ); The final example assumes that a user makes a choice from a selectlist of items. Theonchangeevent handler of the selectlist invokes the following function to navigate to a fic- titious page and locate listings for a chosen sports team on the page. function locate(list) { var choice = list.options[list.selectedIndex].value; external.NavigateAndFind( http://www.collegesports.net/scores.html , choice,  scores ); } frameElementValues:frameor iframeobject reference.Read-OnlyCompatibility:WinIE5.5+, MacIE-, NN-, Moz-, Safari- If the current window exists as a result of a <frame>or <iframe>tag, the window sframeElementproperty returns a reference to the hosting element. As is made clear in thediscussion later in this chapter about the frameelement object, a reference to a frameoriframeelement object provides access to the properties that echo the attributes of theHTML element object. For a window that is not part of a frameset, the frameElementprop- erty returns null. The convenience of this property becomes apparent when a single document is loaded intomultiple framesets. A script in the document can still refer to the containing frameelement, even when the ID of the element changes from one frameset to another. The framesetele- ment is also accessible via the parentElementproperty of the frameElementproperty: var frameSetObj = self.frameElement.parentElement; A reference to the framesetelement opens possibilities of adjusting frame sizes. Related Items:frame, iframeobjects. framesValue:Array.Read-OnlyCompatibility:WinIE3+, MacIE3+, NN2+, Moz1+, Safari1+ In a multiframe window, the top or parent window contains any number of separate frames, each of which acts as a full-fledged windowobject. The framesproperty (note the plural useof the word as a property name) plays a role when a statement must reference an objectlocated in a different frame. For example, if a button in one frame is scripted to load a docu- ment in another frame, the button s event handler must be able to tell JavaScript preciselywhere to display the new HTML document. The framesproperty assists in that task. windowObject.frames
</p>
]]></content:encoded>
			<wfw:commentRSS>http://tomcat.jspwebsitehosting.com/tomcat/379chapter-16window-and-frame-objectsexamplethe-space-web-hosting-first-example-asks/feed/</wfw:commentRSS>
		</item>
	</channel>
</rss>
