Currently, the code is:
It works fine, but I can only add in hover image. If I wanted to add in more, how would I go about doing that?
- Code:
<img border="0px" align="middle" name="showperson" src="STATIC IMAGE LINK THAT SAYS HOVER IMAGES BELLOW HERE">
</br>
<a onmouseover="swap(this,'showperson','YOUR NAME HERE')" href="YOUR FORUM LINK HERE/u1"><img border="0" alt="Owner" src="YOUR AVATAR HERE"></a>
<SCRIPT TYPE="text/javascript">
<!--
// copyright 1998 Idocs, Inc. http://www.idocs.com/tags/
// Distribute this script freely, but please keep this
// notice with the code.
// var image information object
var mloi=new Object();
// set the image for swapping
function setswap()
{
if (! document.images)return;
var imgInfo=new Object();
imgInfo.defaultImg = new Image();
imgInfo.defaultImg.src = document.images[arguments[0]].src;
imgInfo.opts = new Object();
for (var i=1; i < arguments.length; i=i+2)
{
imgInfo.opts[arguments[i]]=new Image();
imgInfo.opts[arguments[i]].src = arguments[i+1];
}
mloi[arguments[0]] = imgInfo;
}
// set up the link for swapping
function swap(link,imgName,optName)
{
if (! document.images)return;
if (! link.swapReady)
{
link.imgName = imgName;
link.onmouseout = swapBack;
link.swapReady = true;
}
document.images[imgName].src=mloi[imgName].opts[optName].src;
}
function swapBack()
{document.images[this.imgName].src=mloi[this.imgName].defaultImg.src}
//-->
</SCRIPT>
<script type="text/javascript">
setswap("showperson",
'YOUR NAME HERE', 'YOUR AVATAR HERE');
//
</script>
It works fine, but I can only add in hover image. If I wanted to add in more, how would I go about doing that?