1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

How to hide a link´s destination URL?

Discussion in 'JavaScript and AJAX' started by chris casab, May 16, 2010.

  1. chris casab

    chris casab New Member

    Hi buddies. After trying hard, I really can´t figure out how this could be done:
    I have some buttons on my web page which are links to other site. When a visitor passes the mouse over them (without clicking), it becomes visible the destination URL in the status bar. I know this is the most normal thing and happens with each link in the world...But, what I want is to totally disable this function, so nothing appears in the bar when passing over buttons. In other words, I want them to have no idea at all about where they will arrive unless they click a button. Somebody can help me? :confused:

    P.S: framed redirect is not a solution in my case.

    Thanks in advance!

  2. shabbir

    shabbir Administrator Staff Member

    <A HREF="SomeURL" onMouseMove="window.status=''">Anchor</A>
  3. chris casab

    chris casab New Member

    Thanks shabbir. But I´m sorry, I couldn´t make it work. Anyways, I believe the onmouseMove event is not what I´m needing. I think I need to use onmouseOver, because I want to make the status bar blank when passing only over the links. Can you imagine other solution? Mine is a plain HTML page.
    No PHP nor Scripts.
    Thanks in advance!
  4. shabbir

    shabbir Administrator Staff Member

    This is Plain HTML only and It can be done by any Mouse Event onmouseMove or onmouseOver
  5. LynxSI

    LynxSI New Member

    This might not work if the user has disabled JavaScript in their client browser. You won't have much luck in that case!

    The other alternative to the above is to use a JavaScript Link Encryption script. However this will also require the client to have JavaScript enabled for their browser. This technique will encode the destination URL in a non-human readable form and then use a JavaScript function to decode it and navigate to it.

    Search in google for "JavaScript Link Encryption".
    - Ben

    P.S. Why is this valuable to you? This sounds kind of suspicious! As a web user I like to know what a page is doing for me in order to trust the web page. Otherwise I might think the sight is "spoofed" and designed for malicious intent like "phishing".
  6. DevPro

    DevPro New Member

    This won't work anymore in FireFox >= 3.5
    If you want to hide the destination Url do something like

    <a href="#" onclick="window.location = 'A URL'; return false;">link</a>
    Another alternative would be a url shortener like bit.ly
  7. johnny.dacu

    johnny.dacu New Member

    maybe a server side encryption is a better solution. You send your link like a parameter, get the real link from database(or other data structure) and then redirect
  8. ManzZup

    ManzZup New Member

    make the link location blank and use jscript to drive web page on the mouseclick event
    but may not work if Jscript disabled, but can use php

Share This Page