Page is a not externally linkable
tedster - 10:23 pm on Feb 13, 2002 (gmt 0)
There's no need build an array when you're only using one rollover image. And no need to use code that can handle three image states when you only use two. And no need for a complex "swap" function. With the importance SEs place on the content to code ratio, it can be helpful to trim away all excess. With that in mind, this is what I use for basic rollover code. image1.gif is the main image and image2.gif is the rollover state. HEAD over=new Image(ww,hh) BODY <a href="url.html" onMouseOver="spot.src=over.src" onMouseOut="spot.src='image1.gif'"><img src="image1.gif" name="spot" width="ww" height="hh"></a> If this can be simplified any further, I'm very interested. (edited by: tedster at 4:47 pm (utc) on Feb. 14, 2002)
A lot of people use WYSIWYG editors like Dreamweaver to create the code for rollover images. Because these programs offer a one-size-fits-all utility, they often create bloated code for what is really a simple purpose.
over.src="image2.gif"