[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 217
  • Last Modified:

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>
0
lukegriffiths110
Asked:
lukegriffiths110
1 Solution
 
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
 
martintechCommented:
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
 
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
 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

 
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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now