Click to See Complete Forum and Search --> : rollover script without hyperlink code
eutamis
12-10-2002, 12:12 AM
I am trying to find code that would allow me to have a rollover effect with an image without a hyperlink.
The best I have done so far is add ONMOUSEOVER to the A tag. It does not seem to work in an IMG tag:confused:
Sceiron
12-10-2002, 02:13 AM
How about...
<script>
top1a = new Image; top1a.src = "http://www.sceiron.com/images/overview_button_1.gif"
top1b = new Image; top1b.src = "http://www.sceiron.com/images/overview_button_2.gif"
function imageChange(imgName,imgSrc) {
document.images[imgName].src = eval(imgSrc +".src")
}
</script>
<p>
<span onmouseover="imageChange('top1','top1b')" onmouseout="imageChange('top1','top1a')"><img src="http://www.sceiron.com/images/overview_button_1.gif" width="90" height="27" border="0" name="top1" id="top1" alt="" /></span>
</p>
eutamis
12-10-2002, 11:54 AM
Two Words.....
Life Saver
:D
Sceiron
12-10-2002, 11:57 AM
Glad I could be of service :)