Changing hover over link info

3 replies
  • WEB DESIGN
  • |
You know when you mouse over a link how it says in the info bar below what the url of the link is, how can you change to say something else? I'm just trying to hide my link because it kind of has personal information in it. I've seen this done before but can't find anything that explains how to do it.

Any Ideas?
#changing #hover #info #link
  • Profile picture of the author VicFranks
    Try using a 301 redirect in your .htaccess


    Add the following to your .htaccess

    redirect 301 /your-link http://your-real-link.com


    So now you link in your page like this:

    <a href="http://yoursite.com/your-link">LINK TEXT</a>



    {{ DiscussionBoard.errors[2187124].message }}
  • Profile picture of the author webatures
    More than likely, you will have to implement javascript for this. Use the onmouseover attribute and append it to your hyperlink element. So for example,

    <a href="mypersonalurl.html" onmouseover="javascript:window.status='my text at the bar below'">My link text</a>

    You should be careful though in that some browsers DO NOT support window.status.

    IMO, if I was designing your website, I would not have ANY identifiable personal information in the URL at all. I would mask it using cookies or a random generated session id or something. The URL would show up in the address bar anyways. Be mindful though that some browsers have also disabled any sort of javascript function that hides any toolbars or address bars too if you were thinking about doing that as well.


    HTH,
    {{ DiscussionBoard.errors[2187306].message }}
  • Profile picture of the author BobJutsu
    I like to use php redirects, and keep a "links" directory on my server. Quick and dirty, and easy to track. On the page you are linking from, just link to your redirect:

    <a href="http://www.yoursite.com/links/NewLink.php">This is a link</a>

    and in NewLink.php:

    <?php

    header( 'Location: http://www.yoursite.com/new_page.html' ) ;

    ?>

    The only thing that shows up to your users is the http://www.yoursite.com/links/NewLink.php (or whatever you name it). Basically the same as the 301 shown above, but I can track it easier and add pages on the fly slightly easier.
    {{ DiscussionBoard.errors[2192232].message }}

Trending Topics