Click to See Complete Forum and Search --> : Mouse Over
ubunreal69
May 18th, 2001, 10:10 PM
i am wondering how to make it so when the users mouse is hovering over certain text an image will switch to one relevant to the text your mouse is over. i know its probably easy but can anyone please tell me how to do it ? :)
scoutt
May 18th, 2001, 10:14 PM
if you can wait until I get off work, about an hour form now, I have some code at home that will do that. unless somebody else can answer
ubunreal69
May 18th, 2001, 10:15 PM
k, i'll try and stay online as long as possible :)
scoutt
May 18th, 2001, 11:29 PM
sorry it took so long but you should beable to change a couple of things to do what you want. if not i can help.
<SCRIPT LANGUAGE = "JavaScript">
// Javascript Animation
// Script Genereated by Eyeball Animation code generator
// http://www.eyeball-design.com (freebie section)
<!-- hide
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
browser = "NotOk";
// Detect if Netscape or MSIE version is ok
if (browserName == "Netscape" && browserVer >= 3) { browser = "ok"}
if (browserName == "Microsoft Internet Explorer" && browserVer == 4) { browser =
"ok"}
// Initialize your images
if (browser == "ok") {
Link1= new Image(); Link1.src = "images/dclosed.gif";
Link1on = new Image(); Link1on.src = "images/dopen.gif";
Link2= new Image(); Link2.src = "images/dclosed.gif";
Link2on = new Image(); Link2on.src = "images/dopen.gif";
Link3= new Image(); Link3.src = "images/dclosed.gif";
Link3on = new Image(); Link3on.src = "images/dopen.gif";
Link4= new Image(); Link4.src = "images/dclosed.gif";
Link4on = new Image(); Link4on.src = "images/dopen.gif";
}
function swap(imgName,select)
{ if (browser == "ok") {imgOn = eval(select+ ".src");
document.images[imgName].src = imgOn; }}
// --> </SCRIPT >
and this is what triggers it
<table border=0 align=center>
<tr>
<TD valign=left>
<!-- Code for Link : gift three.jpg -->
<a href="gift.html"
onmouseover="swap('imgLink3','Link3on')"
onmouseout="swap('imgLink3','Link3')">
<img name ="imgLink3"
src= "images/dclosed.gif" border = 0 alt = "dopen.gif"></a>
</TD>
<TD valign=left>
<!-- Code for Link : gift four -->
<a href="gift.html"
onmouseover="swap('imgLink4','Link4on')"
onmouseout="swap('imgLink4','Link4')">
<img name ="imgLink4"
src= "images/dclosed.gif" border = 0 alt = "dopen.gif"></a>
</TD>
<TD valign=left>
<!-- Code for Link : gift one -->
<a href="gift.html"
onmouseover="swap('imgLink1','Link1on')"
onmouseout="swap('imgLink1','Link1')">
<img name ="imgLink1"
src= "images/dclosed.gif" border = 0 alt = "dopen.gif"></a>
</TD>
<TD valign=left>
<!-- Code for Link : gift two -->
<a href="gift.html"
onmouseover="swap('imgLink2','Link2on')"
onmouseout="swap('imgLink2','Link2')">
<img name ="imgLink2"
src= "images/dclosed.gif" border = 0 alt = "dopen.gif"></a>
</TD>
</tr>
</table>
if not I have a script that uses a dropdown box and changes images when clicked
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.