/    Sign up×
Community /Pin to ProfileBookmark

Image in ALT when hovering over text

Could somebody PLEASE help me find the code to have an image in the ALT when hovering over text? I found this code long ago on JavaScriptSource, but lost it, now cannot find it again. Thanks for any help! I GREATLY appreciate it!

to post a comment
JavaScript

8 Comments(s)

Copy linkTweet thisAlerts:
@Rick_BullNov 21.2002 — [i]Originally posted by Dave Clark [/i]

[B]...only the IMG tag has an [b]alt[/b] attribute[b]Dave[/b] [/B][/QUOTE]


Don't forget the input element does too ?
Copy linkTweet thisAlerts:
@CharlesNov 22.2002 — [P]lease keep in mind that HTML 4+ is very new and not all current browsers support it or support all of it.[/quote]

The HTML 4.0 Recommendation came out 18 December 1997 and was superseded by HTML 4.01 24 December 1999. That's quite a long time ago considering that HTML 3.2 came out 14 January 1997.

But hat doesn't mean that one ought to use the ALT attribute for the pop up thingy that's also called a tool tip. Said attribute is supposed to provide an alternative text for when the image cannot be rendered, as with a Braille browser http://www.w3.org/TR/html401/struct/objects.html#adef-alt ). Use the TITLE attribute instead ( http://www.w3.org/TR/html401/struct/global.html#adef-title ).
Copy linkTweet thisAlerts:
@Rick_BullNov 22.2002 — Sorry if I offended you, I was only adding a comment, which I though may help you.
Copy linkTweet thisAlerts:
@CharlesNov 22.2002 — Rick,

Yes, you and I were commenting on replys to the original post and not the original post itself, just as Mr. Clark was doing when he upbraided us for doing so.
Copy linkTweet thisAlerts:
@natalieauthorNov 23.2002 — OKAY! I did not necessarily mean HTML, its a JavaScript (hence the posting here). I've seen it and used it before and it worked. What I want to do is have a link... When hovering over the link, and image show up, but not in a new window, more like in an "ALT" mode. Supposing I didn't make myself clear. Here's where I want to put it (assuming my computer doesn't freeze and you can view this page):

http://68.13.179.122:59143/koaxweather/currenttemps.htm

When you hover over a city on the map, it shows the current conditions. However, I want to put all of those images at the bottom for each city in the hover message as well. This page is currently 100% HTML, but I want to add the JavaScript which will do this. Thanks!
Copy linkTweet thisAlerts:
@Rick_BullNov 23.2002 — If I'm looking at the right thing, it looks like the title attribute to me (as was suggested by Charles I think earlier):

<img src="image.png" alt="" title="Your popup text here">
Copy linkTweet thisAlerts:
@Zach_ElfersNov 23.2002 — You can't put an image in the alt attribute.
Copy linkTweet thisAlerts:
@natalieauthorNov 24.2002 — Okay, okay, okay! I get it now. I just can't figure out where to put the HTML code for an image. Could you help me out on this one? Thanks!

[i]Originally posted by Dave Clark [/i]

[B]My original post is the solution to your need:



http://developer.netscape.com/viewsource/wyner_balloonhelp.html



This is the [b][i]only[/i][/b] "ALT"-like or TITLE-like structure that is going to allow you to show an image and a link -- as a hovering structure -- when an [b]onMouseOver[/b] event is fired. Neither ALT nor TITLE will let you show anything except text. The above link is not for something that pops up in a new window. It is a DHTML (HTML/JavaScript) structure (DIV block) that can also contain HTML within it. It pops up in the same manner that the text content of an ALT or a TITLE pops up -- except that, as I said, it can show rendered HTML to boot.



[b]Dave[/b] [/B]
[/QUOTE]
×

Success!

Help @natalie 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.18,
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,
)...