Go4Expert

Go4Expert (http://www.go4expert.com/)
-   JavaScript and AJAX (http://www.go4expert.com/forums/javascript/)
-   -   How to hide a link´s destination URL? (http://www.go4expert.com/forums/hide-links-destination-url-t22110/)

chris casab 16May2010 09:46

How to hide a link´s destination URL?
 
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!

Chris

shabbir 16May2010 12:02

Re: How to hide a link´s destination URL?
 
HTML Code:

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

chris casab 18May2010 09:52

Re: How to hide a link´s destination URL?
 
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!
Chris

shabbir 18May2010 10:02

Re: How to hide a link´s destination URL?
 
This is Plain HTML only and It can be done by any Mouse Event onmouseMove or onmouseOver

LynxSI 24May2010 05:40

Re: How to hide a link´s destination URL?
 
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".

DevPro 6Jun2010 19:40

Re: How to hide a link´s destination URL?
 
Quote:

Originally Posted by shabbir (Post 68153)
HTML Code:

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

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

HTML Code:

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

johnny.dacu 7Jul2010 22:19

Re: How to hide a link´s destination URL?
 
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

ManzZup 7Aug2010 10:02

Re: How to hide a link´s destination URL?
 
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


All times are GMT +5.5. The time now is 03:32.