/    Sign up×
Community /Pin to ProfileBookmark

onmouseover issue within frames

Hi, I’m having a problem trying to get my image to go back to the original image before the mouse rolled over it. I am using frames so the “target=content” has to stay the same. I tried changing the “id=nava” to differernt “nava”‘s such as nava1, nava2, etc….but still it does not work. Any help would be great.

[code=php]
<html>
<head><title>Table Of Content</title>
<script type = “text/javascript”>

captionImage2 = new Image();
captionImage2.src = “mover.jpg”;

function mOver()
{
if ( event.srcElement.id == “nava” );
{
event.srcElement.src = captionImage2.src;
return;
}
if ( event.srcElement.id )
event.srcElement.style.color = event.srcElement.id;
}

function mOut()
{
if ( event.srcElement.id == “nava” )
{
event.srcElement.src = captionImage2.src;
return;
}

if ( event.srcElement.id )
event.srcElement.innerText = event.srcElement.id;
}

document.onmouseover = mOver;
document.onmouseout = mOut;
</script>
</head>

<body bgcolor = black>

<a href=”triva.html” target=content><img src = “trivia.jpg” id = “nava”></a>
<br>
<a href=”sales.html” target=content><img src = “product.jpg” id = “nava”></a>
<br>
<a href=”craps.html” target=content><img src = “craps.jpg” id = “nava”></a>
<br>
<a href=”project11-10.html” target=content><img src = “sales.jpg” id = “nava”></a>
<br>
<a href=”http://www.nfl.com” target=content><img src = “nfl.gif” id = “nava”></a>
<br><BR>

<br><br><br><br>
<center><a href=”content.html” target=content><img src = “home.jpg” width = 100 height =

100></a></center>
<br><br><br>
</body>
</html>
[/code]

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @harlemrisin spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...