/    Sign up×
Community /Pin to ProfileBookmark

Image / mouse over question

What i want to do is roll over the text and when the user does that i want a picture to load. If that that is poassible.

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@fredmvOct 19.2003 — Something like this? ?<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>untitled</title>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=iso-8859-1" />
<style type="text/css">
/*<![CDATA[*/
span {
font-family: helvetica, serif;
font-size: 10pt;
color: #009900;
font-weight: bold;
cursor: pointer;
}
/*]]>*/
</style>
<script type="text/javascript">
/*<![CDATA[*/
var img = null;
var out = null;

<i> </i> function loadImage(url)
<i> </i> {
<i> </i> out = document.getElementById( "test" );
<i> </i> out.innerHTML = '&lt;img src="' + url + '" alt="" /&gt;';
<i> </i> }
<i> </i> /*]]&gt;*/
<i> </i> &lt;/script&gt;
<i> </i>&lt;/head&gt;

<i> </i>&lt;body&gt;
<i> </i> &lt;div&gt;
<i> </i> &lt;span onmouseover="loadImage( 'http://forums.webdeveloper.com/images/top_profile.gif' );"&gt;Image 1&lt;/span&gt; |
<i> </i> &lt;span onmouseover="loadImage( 'http://forums.webdeveloper.com/images/top_register.gif' );"&gt;Image 2&lt;/span&gt;
<i> </i> &lt;hr /&gt;
<i> </i> &lt;div id="test"&gt;&lt;/div&gt;
<i> </i> &lt;/div&gt;
<i> </i>&lt;/body&gt;
&lt;/html&gt;
Copy linkTweet thisAlerts:
@newtdaauthorOct 19.2003 — yea something like that, where did you do that in?
Copy linkTweet thisAlerts:
@fredmvOct 19.2003 — [i]Originally posted by newtda [/i]

[B]where did you do that in? [/B][/QUOTE]
I coded it by hand. If you mean, "what language did I do it in", I used XHTML, CSS, and JavaScript. ?
×

Success!

Help @newtda 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.17,
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,
)...