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 WebObjects Generated DHTML

You might have noticed that the DHTML we generated was not optimal. In particular, it didn't employ image preloading, which helps to improve the first impression of the rollovers.

In this section we'll look at adding image preloading to WORollover and then incorporate it into DynamicMovies.

Using WOJavaScript

Let's return to WORollover. Open the component in WebObjects Builder.

What we want to achieve in terms of HTML and JavaScript is something along the lines of the following:

						<script language=JavaScript>
						        image_U = new Image();
						        image_U.src = '/image.gif';
						        image_H = new Image();
						        image_H.src = '/imageH.gif';
						</script>
<a href="/index.html" onMouseOver="image.src=image_H.src;"
						onMouseOut="image.src=image_U.src;"> ...
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