15.02.2013 Views

JavaScript Examples Bible - UserWorks Technologies

JavaScript Examples Bible - UserWorks Technologies

JavaScript Examples Bible - UserWorks Technologies

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

240<br />

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

document.referrer<br />

Listing 18-10: Placeholder for Listing 18-8<br />

<br />

<br />

Opening Placeholder<br />

<br />

<br />

Initial place holder. Experiment with other URLs for this frame (see below).<br />

<br />

<br />

parentWindow<br />

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

Compatibility ✓ ✓ ✓<br />

Example<br />

To prove the parentWindow property points to the document’s window, you can<br />

enter the following statement into the top text field of The Evaluator (Chapter 13 in<br />

the <strong>JavaScript</strong> <strong>Bible</strong>):<br />

document.parentWindow == self<br />

This expression evaluates to true only if both references are of the same object.<br />

protocol<br />

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

Compatibility ✓ ✓ ✓<br />

Example<br />

If you use The Evaluator (Chapter 13 in the <strong>JavaScript</strong> <strong>Bible</strong>) to test the document.<br />

protocol property, you will find that it displays File Protocol in the results<br />

because you are accessing the listing from a local hard disk or CD-ROM.<br />

referrer<br />

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

Compatibility ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓

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

Saved successfully!

Ooh no, something went wrong!