Hide URL Destination in linked images

Discussion in 'HTML & Website Design' started by red-sky, Oct 4, 2008.

  1. #1
    Hi,

    I have just found this piece of code to allow me to link text and at the same time hide the destination URL:

    <a onmouseover="window.status='You are now visiting another page';return true;" onmouseout="window.status='';return true;" href="http://mywebsite.com">Clicking Here</a>

    This piece of code works fine for text, but it doesn't work when hyperlinking images, can anyone tell me why and how to resolve it?

    Cheers
     
    red-sky, Oct 4, 2008 IP
  2. MikeHayes

    MikeHayes Peon

    Messages:
    95
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi,

    Try this, it works.

    <A HREF="http://www.destination.com"
    ONMOUSEOVER="window.status='Destination is here!';return true;"
    ONMOUSEOUT="window.status='Destination is NOT here!';return true;">
    <IMG SRC="image.gif"></A>


    Good luck,

    Mike
     
    MikeHayes, Oct 9, 2008 IP
  3. red-sky

    red-sky Peon

    Messages:
    89
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I just tried your code above and it's not working, does anybody have any ideas?
     
    red-sky, Oct 10, 2008 IP
  4. rajku

    rajku Member

    Messages:
    37
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    33
    #4
    Try this...
    <a href="http://mywebsite.com" onMouseOver="window.status='Go to mywebsite'; return true" onMouseOut="window.status=''; return true"><img src="img.gif" width="100"></a>
     
    rajku, Oct 10, 2008 IP
  5. red-sky

    red-sky Peon

    Messages:
    89
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Still not working :confused:, does it need to be a GIF file?

    P.s. Their are edits to the a:hover in the CSS file, but all thats changed is the text colour and text decoration. Would this affect it?
     
    red-sky, Oct 10, 2008 IP
  6. rajku

    rajku Member

    Messages:
    37
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    33
    #6
    really strange.. it works for me. Add any image thats just an example. I hope you are not checking this in FF. It works only in IE.
    CSS cant conflict with this.
     
    rajku, Oct 10, 2008 IP
  7. rajku

    rajku Member

    Messages:
    37
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    33
    #7
    i have checked your site its working where you added the code (IE only).
     
    rajku, Oct 10, 2008 IP