Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Display image when mouseover on anchor

Reply
Thread Tools

Display image when mouseover on anchor

 
 
Hvid Hat
Guest
Posts: n/a
 
      09-22-2008
Hi

I'd like to display an image when mouseover on an anchor. The image should be
shown where the anchor is located and I don't want a popup window. It should
also disappear once the mouse leaves the image.

<a onmouseover="">move mouse here to see image</a>

Is this possible? I've searched but I haven't found anything useful.
 
Reply With Quote
 
 
 
 
Sherm Pendley
Guest
Posts: n/a
 
      09-22-2008
"Hvid Hat" <(E-Mail Removed)> writes:

> I'd like to display an image when mouseover on an anchor. The image should be
> shown where the anchor is located and I don't want a popup window. It should
> also disappear once the mouse leaves the image.
>
> <a onmouseover="">move mouse here to see image</a>
>
> Is this possible?


It's easy with JavaScript, but keep in mind that not everyone will
allow that, so it's not a good idea to use it for anything that's
required for your page to work. If the image is a non-essential
convenience, like a thumbnail of the full-size image the link leads to
or some such, go for it.

sherm--

--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net
 
Reply With Quote
 
 
 
 
Hvid Hat
Guest
Posts: n/a
 
      09-22-2008
On 22-09-2008 22:34:45, Sherm Pendley wrote:
> "Hvid Hat" <(E-Mail Removed)> writes:


> It's easy with JavaScript, but keep in mind that not everyone will
> allow that, so it's not a good idea to use it for anything that's
> required for your page to work. If the image is a non-essential
> convenience, like a thumbnail of the full-size image the link leads to
> or some such, go for it.


The image is non-essential. I've got a table of football players and as the
last column I want an anchor that shows a player image on mouseover. I've
been looking for a simple javascript solution without luck. I've been looking
at Lightbox etc. but isn't that overkill?
 
Reply With Quote
 
Roy A.
Guest
Posts: n/a
 
      09-22-2008
On 22 Sep, 22:22, "Hvid Hat" <(E-Mail Removed)> wrote:
> Hi
>
> I'd like to display an image when mouseover on an anchor. The image should be
> shown where the anchor is located and I don't want a popup window. It should
> also disappear once the mouse leaves the image.
>
> <a onmouseover="">move mouse here to see image</a>


The attribute onmouseover tells me that this is an javascript
question. Pleas
ask this kind of questions to a group like comp.lang.javascript or
alt.comp.lang.*javascript.

However, if JavaScript is disabled, you can use CSS.

<a onmouseover="">move mouse here to see image<img ...></a>
a img { position: absolute; visibility: hidden }
a:hover img { visibility: visible }

>
> Is this possible? I've searched but I haven't found anything useful.


 
Reply With Quote
 
Hvid Hat
Guest
Posts: n/a
 
      09-22-2008
On 22-09-2008 23:49:12, "Roy A." wrote:

> However, if JavaScript is disabled, you can use CSS.
>
> <a onmouseover="">move mouse here to see image<img ...></a>
> a img { position: absolute; visibility: hidden }
> a:hover img { visibility: visible }


Very nice! Didn't even think of that. Thanks!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to orient mouseover display. DLU HTML 1 01-23-2009 02:03 AM
Image and Text display on mouseover Maxi Javascript 9 04-12-2006 12:15 AM
mouseover display text with <a> tag Doug HTML 4 03-13-2006 08:15 AM
VS 2005 Beta 2: Changing an ImageButton image on MouseOver when using Skin IDs Chris ASP .Net 0 08-03-2005 03:15 PM
Disable the URL display in Browser status when mouseover a treenode RodBillett ASP .Net Web Controls 3 01-05-2004 10:31 PM



Advertisments