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.

Chapter 2 ✦ Window and Frame Objects (Chapter 16)<br />

<br />

<br />

<br />

<br />

Setting Outer Sizes<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

As the document loads, it saves the current outer dimensions in global variables.<br />

One of the buttons restores the windows to these settings. Two parallel sets of buttons<br />

set the inner and outer dimensions to the same pixel values so that you can<br />

see the effects on the overall window and document area when a script changes the<br />

various properties.<br />

Because Navigator 4 displays different-looking buttons in different platforms (as<br />

well as other elements), the two buttons contain script instructions to size the window<br />

to best display the window contents. Unfortunately, no measure of the active<br />

area of a document is available, so that the dimension values were determined by<br />

trial and error before being hard-wired into the script.<br />

navigator<br />

NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5<br />

Compatibility ✓ ✓ ✓ ✓<br />

Example<br />

This book is littered with examples of using the navigator object, primarily for<br />

performing browser detection. <strong>Examples</strong> of specific navigator object properties<br />

can be found in Chapter 28 of the <strong>JavaScript</strong> <strong>Bible</strong> and Chapter 12 of this book.<br />

offscreenBuffering<br />

NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5<br />

Compatibility ✓ ✓ ✓<br />

139<br />

windowObject.offscreenBuffering

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

Saved successfully!

Ooh no, something went wrong!