11.12.2012 Views

JavaScript 2.0-The Complete Reference, Second ... - freecodingtutorial

JavaScript 2.0-The Complete Reference, Second ... - freecodingtutorial

JavaScript 2.0-The Complete Reference, Second ... - freecodingtutorial

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

}<br />

if (layerobject)<br />

{<br />

}<br />

theLayer.document.write(content);<br />

theLayer.document.close();<br />

return;<br />

if (theLayer.innerHTML)<br />

theLayer.innerHTML = content;<br />

We skipped discussion of a few routines, but their style and usage follow the ones already<br />

presented. <strong>The</strong> complete layer library is presented here:<br />

/* layerlib.js: Simple Layer library with basic<br />

compatibility checking */<br />

/* detect objects */<br />

var layerobject = ((document.layers) ? (true) : (false));<br />

var dom = ((document.getElementById) ? (true) : (false));<br />

var allobject = ((document.all) ? (true) : (false));<br />

/* detect browsers */<br />

opera=navigator.userAgent.toLowerCase().indexOf('opera')!=-1;

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

Saved successfully!

Ooh no, something went wrong!