Skip to Content
WebObjects® Developer's Guide
book

WebObjects® Developer's Guide

by Ravi Mendis
June 2002
Intermediate to advanced content levelIntermediate to advanced
400 pages
7h 48m
English
Sams
Content preview from WebObjects® Developer's Guide

Optimizing Components Using Nonsynchronized Variables

Our next task is to add rollovers to the image map. That is when a link becomes highlighted when the mouse rolls over it. We'll prototype the component using image preloading right from the start. Otherwise, you can't expect the rollovers to be smooth for larger images.

Hence, we'd produce a DHTML along the lines of

<script language=JavaScript>
        image_U = new Image();
        image_U.src = '/image.gif';
        image_H1 = new Image();
					image_H1.src = '/imageH1.gif';
					image_H2 = new Image();
					image_H2.src = '/imageH2.gif';
</script>
<Map Name="splashmap" onMouseOut="image.src=image_U.src">
        <Area Shape=Rect Coords="191,137,259,174" Href="/page1.html"
        onMouseOver="image.src=image_H1.src"> <Area Shape=Rect Coords="191,137,259,174" ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Real World XML

Real World XML

Steven Holzner
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer

Publisher Resources

ISBN: 0672323265Purchase book