/    Sign up×
Community /Pin to ProfileBookmark

JavaScript Rollover Link – URL To Image

Hi all, ?

I’m trying to use the onmouseover() function to change my URL to an image but I cannot get my head around it. The image I want to change to is called “Orange_Logo.jpg” and it is located in the local “images” folder.

[B]Link Code:[/B]

[code]
<div id=”networkOrange”>
<a href=”http://www.orange.co.uk/” id=”textLink”>Orange</a>
</div>
[/code]

Any help on this matter would be fantastic!

Regards,

Amph.

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@ZeroKilledMay 04.2009 — incomplete details. the code doesn't show where is the image, if it is an <IMG> element or if is an image as background with css styles. nor you have mentioned where the [b]onmouseover[/b] event occur. the forum have dozen of thread about [url=http://www.webdeveloper.com/forum/search.php?searchid=3004921]rollover[/url].
Copy linkTweet thisAlerts:
@AmphidamasauthorMay 04.2009 — This site uses the same method as the one I'm trying to emulate.

The image element I am trying to rollover from the URL is located on my HDD at --> C:UsersAmphDesktopText Compaction SiteimagesOrange_Logo.jpg

Below is the code for my link which is where the onmouseover event will occur, but I don't know how to create a function for the rollover... The function will be located in an external .js file.

<i>
</i>&lt;div id="networkOrange"&gt;
&lt;a href="http://www.orange.co.uk/" id="textLink" onmouseover=""&gt;Orange&lt;/a&gt;
&lt;/div&gt;
Copy linkTweet thisAlerts:
@ZeroKilledMay 05.2009 — the link show a dynamic menu. i know, at the very end of each menu an image appear. however, what i'm not sure is whether you want to change the state of an image (so the name of rollover) or whether you want to show different images on the same placeholder when mouse overing certain elements, i guess in your case anchors.
×

Success!

Help @Amphidamas 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.19,
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,
)...