Suppose these are the two images we want to use for our rollover: and . We create the reset image the same way as in the previous example adding only two lines of code to make it a rollover:
Which gives us this form:(You may notice that we also that we set the submit button as a rollover using the Rollover Submit Image technique.)
We set the "mouseout" image as the regular image for the reset. To add the rollover, we first give it the image a name. In our example we name the image
"resetter" with the command
ri.name = "resetter";.
You must give the image a name or script will fail to generate the necesary code.
We then indicate the source of the "mouseover" image with the command
ri.rollover = "reset.over.gif";.