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.

ecalc([allFlag])<br />

Chapter 4 ✦ The Document and Body Objects (Chapter 18)<br />

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

Compatibility ✓ ✓<br />

Example<br />

You can see an example of recalc() in Listing 15-32 (in Chapter 1 of this book)<br />

for the setExpression() method. In that example, the dependencies are between<br />

the current time and properties of standard element objects.<br />

write(“string1” [,”string2” ...<br />

[, “stringn”]])<br />

writeln(“string1” [,”string2” ...<br />

[, “stringn”]])<br />

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

Compatibility ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓<br />

Example<br />

The example in Listings 18-16 through 18-18 demonstrates several important<br />

points about using the document.write() or document.writeln() methods for<br />

writing to another frame. First is the fact that you can write any HTML code to a<br />

frame, and the browser accepts it as if the source code came from an HTML file<br />

somewhere. In the example, I assemble a complete HTML document, including<br />

basic HTML tags for completeness.<br />

Listing 18-16: Frameset for document.write() Example<br />

<br />

<br />

Writin’ to the doc<br />

<br />

<br />

<br />

<br />

<br />

<br />

253<br />

document.write()

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

Saved successfully!

Ooh no, something went wrong!