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 6 ✦ Image, Area, and Map Objects (Chapter 22)<br />

<br />

<br />

<br />

<br />

<br />

AREA Element Object<br />

Properties<br />

coords<br />

shape<br />

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

Compatibility ✓ ✓ ✓ ✓<br />

Example<br />

See Listing 22-7 for a demonstration of the coords and shape properties in the<br />

context of scripting MAP element objects.<br />

MAP Element Object<br />

Property<br />

areas<br />

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

Compatibility ✓ ✓ ✓ ✓<br />

Example<br />

Listing 22-7 demonstrates how to use scripting to replace the AREA element<br />

objects inside a MAP element. The scenario is that the page loads with one image of<br />

a computer keyboard. This image is linked to the keyboardMap client-side image<br />

map, which specifies details for three hot spots on the image. If you then switch the<br />

331<br />

MAP.areas

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

Saved successfully!

Ooh no, something went wrong!