|
|
<IMG ...><IMG ...>NAME
<IMG
SRC="imagedefault.gif"
WIDTH=100 HEIGHT=100 ALT="Many Links, One Rollover"
NAME="showperson"
>
<SCRIPT TYPE="text/javascript">
<!--
setswap("showperson",
'starflower', 'starflower2.gif',
'allen', 'allen.gif',
'jimmy', 'jimmy.gif',
'paul', 'paul.gif',
'miko', 'miko2.gif'
);
//-->
</SCRIPT>
The first part of the tag is pretty normal: it sets the
SRCHEIGHTWIDTHALTSRCNAMENAME="showperson". The image must have a name so that we can refer to it in the link tags.
After the <IMG ...>setswap(). The parameters for setswap() consist of a two-column list of images. Two pieces of information are passed for each image. In the first column is a nickname for the image. The second column has the source for the picture. This list can be as long as you like. Be sure that there is a comma after every nickname and after every source except for the last source in the list. Also, don't forget to put a closing paren after the list.
Now we create the links which trigger the rollover.
Copyright 1997-2002 Idocs Inc. Content in this guide is offered freely to the public under the terms of the Open Content License and the Open Publication License. Contents may be redistributed or republished freely under these terms so long as credit to the original creator and contributors is maintained.