| home / programming / javascript / domscripting / 1 | [previous][next] |
|
Scripting for 5th Generation Browsers and BeyondFour State DOM Rollovers with a Single ImageRemember that earlier I stated that the
As noted previously, what is important in the above tag is to set a unique
In this example, we utilize three arguments,
Let's consider what is occurring here for a moment. We have enabled four image dimensions for a single image. Effectively, we have produced a four state disjointed rollover. The four states are:
Netscape Rollover FixBefore you all start screaming at me with complaints that rollovers don't work properly in Netscape 6 because of a refresh bug, let me make the point that the thing with Web development is to find solutions to these types of problems wherever possible. Sometimes no solution exists and as Web developers we have to wear that, but on many occasions solutions do exist, provided we start to think out of the box. Luckily, such a solution exists for the Netscape 6 refresh bug and rollovers. To fix the rollover problem in Netscape 6 two things need to occur. Use a timer to force the rollovers, e.g. function forceIt(){
setTimeout("swapImage()",1);
}
and to fix the refresh bug use |
setAttribute()| home / programming / javascript / domscripting / 1 | [previous][next] |
Created: August 16, 2001
Revised: August 16, 2001