whats wrong with the rollover

The top rollover works, the bottom rollover changes the top rollover. I have tried changing the syntax several times. can anyone help it is prob very simple.


<a href="MID.html#instruction" target="MID" onmouseover="image1.src='in1.jpg';"
onmouseout="image1.src='in2.jpg';">
<img name="image1" src="in2.jpg"></a>

<BR><BR><BR><BR>

<a href="project.asp" target="MID" onmouseover="image1.src='track1.jpg';"
onmouseout="image2.src='track2.jpg';">
<img name="image2" src="track2.jpg"></a>
lukegriffiths110Asked:
Who is Participating?
 
martintechConnect With a Mentor Commented:
You will have to introduce a bit of javascript so that your browser can differentiate from the two functions:  Try this instead:

<SCRIPT LANGUAGE="Javascript">
<!--
if (document.images) {
     var deskn = new Image(); // for the inactive image
     deskn.src = "in1.jpg";
     var deska = new Image(); // for the active image
     deska.src = "in2.jpg";
var webn = new Image(); // for the inactive image
  webn.src = "track1.jpg";
  var weba = new Image(); // for the active image
  weba.src = "track2.jpg";
}
function act(imgName) {
  if (document.images)
    document[imgName].src = eval (imgName + "a.src");
}
function inact(imgName) {
  if (document.images)
    document[imgName].src = eval (imgName + "n.src");
}
//-->
</SCRIPT>
<A ONMOUSEOVER="act('desk')" ONMOUSEOUT="inact('desk')"
HREF="MID.html#instruction">
     <IMG SRC="in1.jpg" BORDER="0" NAME="desk"></A><p>&nbsp;</p>
<p>
<A ONMOUSEOVER="act('desk')" ONMOUSEOUT="inact('desk')"
HREF="project.asp">
     &nbsp;</A><A ONMOUSEOVER="act('web')" ONMOUSEOUT="inact('web')"
><IMG SRC="track1.jpg"
BORDER="0" NAME="web">
0
 
CallandorCommented:
You've posted this in the Hardware TA - perhaps you should post a note in Community Support and have it moved to Web Development?
0
 
fhbandyCommented:
<a href="project.asp" target="MID" onmouseover="image1.src='track1.jpg';"
onmouseout="image2.src='track2.jpg';">


You are missing a " after image1.src. This may or may not fix it but might be the simple little thing that is creating the kink.
0
Improved Protection from Phishing Attacks

WatchGuard DNSWatch reduces malware infections by detecting and blocking malicious DNS requests, improving your ability to protect employees from phishing attacks. Learn more about our newest service included in Total Security Suite today!

 
COBOLdinosaurCommented:
You have atypo in the second one.

It should be going to image2.src and you have it going to image1.src

change:
<a href="project.asp" target="MID" onmouseover="image1.src='track1.jpg';"
onmouseout="image2.src='track2.jpg';">
<img name="image2" src="track2.jpg"></a>
to:
<a href="project.asp" target="MID" onmouseover="image2.src='track1.jpg';"
onmouseout="image2.src='track2.jpg';">
<img name="image2" src="track2.jpg"></a>
End of problem.

Cd&
0
 
GwynforWebCommented:
hmm
0
 
COBOLdinosaurCommented:
Rom,

The answer has been acccepted in the other one.  This is just going to end up abandoned.  It might be bettr to just put all the points on the other one and then delete this.  Whadda think?  It is more than a little out of place in Hardware anyway.

Cd&
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.