/    Sign up×
Community /Pin to ProfileBookmark

Display image based on link

I am sure this is vey easy, but I have not done much with javascript.

I am trying to show the ‘buttonOver’ image if I am on that page.

<a href=”/FI/fiApprovals.asp”><div class=”button” onMouseOver=”this.className=’buttonOver’;” onMouseOut=”this.className=’button’;”>Approvals</div>

I appreciate any help.
Thanks,

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@FangSep 19.2007 — Can be done with css:&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
&lt;title&gt;css rollover image&lt;/title&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;

&lt;style type="text/css"&gt;
a.button {
display:block;
background:#9cf url(outImage.jpg) no-repeat;
width:100px;
height:30px;
}
a.button:hover {
background:#9cf url(overImage.jpg) no-repeat;
}

&lt;/style&gt;

&lt;/head&gt;
&lt;body&gt;
&lt;a href="/FI/fiApprovals.asp" class="button"&gt;Approvals&lt;/a&gt;
&lt;/body&gt;
&lt;/html&gt;
×

Success!

Help @dealerTMVP 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 6.1,
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,
)...