15.02.2013 Views

JavaScript Examples Bible - UserWorks Technologies

JavaScript Examples Bible - UserWorks Technologies

JavaScript Examples Bible - UserWorks Technologies

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

128<br />

<strong>JavaScript</strong> <strong>Examples</strong> <strong>Bible</strong>: The Essential Companion to <strong>JavaScript</strong> <strong>Bible</strong><br />

<strong>Examples</strong> Highlights<br />

✦ Listing 16-4 for the window.closed property demonstrates an industrialstrength<br />

treatment of new window creation, which works with all scriptable<br />

browsers (taking into account shortcomings of earlier browsers).<br />

✦ NN4+ allows dynamic control over the presence of window chrome (statusbar,<br />

toolbar, et al.) with the help of signed scripts, as shown in Listing 16-6.<br />

Without signed scripts, or for IE, you must use window.open() to create a<br />

separate window with the characteristics of your choice.<br />

✦ The example listings for the window.opener property show you how scripts<br />

from a subwindow communicate with the window that opened it.<br />

✦ In the example listings for the window.parent property, you see how references<br />

to the various synonyms for a window object within a frameset evaluate.<br />

Thus, you can see what the references window, top, parent, and self mean<br />

within a frameset.<br />

✦ Compare Listings 16-20, 16-23, and 16-29 to understand not only the different<br />

looks of the three native dialog box windows (alert, confirm, and prompt), but<br />

also how values returned from two of them can influence script processing<br />

sequences.<br />

✦ A simple countdown timer in Listing 16-22 shows a practical application of the<br />

window.clearTimeout() method. Here the method stops the looping timer<br />

when the count reaches zero.<br />

✦ Watch the browser window dance in Listing 16-24. The window.moveBy() and<br />

window.moveTo() methods put window positioning through its paces.<br />

✦ <strong>Examples</strong> for window.setInterval() and window.setTimeout() apply<br />

these two similar methods to applications that are ideal for each one. You find<br />

other applications of setTimeout() in examples for the window.closed<br />

property and window.open() method.<br />

✦ Internet Explorer’s modal and modeless dialog box windows get workouts in<br />

Listings 16-39 through 16-42.<br />

✦ The composition of a frameset, including the sizes of the frames, can be controlled<br />

dynamically in IE4+ and NN6, as shown in examples for the FRAMESET.<br />

cols and FRAMESET.rows properties.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!