Home > Javascript > Hidden URL (Link) in Windows Status Bar with Javascript

Hidden URL (Link) in Windows Status Bar with Javascript

September 13th, 2008 Admin Leave a comment Go to comments

If we move our mouse over active link it will shown up the link address in windows status bar (fig.1). Now we can change this habbit to shown up in status bar as we like. This is perfectly for hide real address, maybe to hide your referral link :)

Normal Status Bar When Hover a Mouse to An Active Link

Normal Status Bar When Hover a Mouse to An Active Link

Normally, if we want to make an active link we’ll set like this

<a href=”http://google.com”>Link</a>

Now with javascript we change a little bite to

<a href=”#” onclick=”goToURL()”>Link</a>

Now it’s javascript part

?View Code JAVASCRIPT
<script>
function goToURL() { window.open("http://google.com/"); }
</script>

It will open Google in new window. If you prefer to open in the same window, you can change this code into

?View Code JAVASCRIPT
<script>
function goToURL() { window.location = "http://google.com/";  }
</script>

Just set any URL like in the javascript code. Now your status bar will look like this if any mouse over this link.

Hidden Link in Window Status Bar

Hidden Link in Window Status Bar

And this is a whole code in single file.

?View Code JAVASCRIPT
<a href="#" onclick="goToURL()">Links Open in NEW window</a>
 
<script>
function goToURL() { window.open("http://google.com/"); }
</script>
<br /><br />
<a href="#" onclick="goToURL2()">Links Open in SAME window</a>
 
<script>
function goToURL2() { window.location = "http://google.com/"; }
</script>
  1. James
    September 19th, 2008 at 06:47 | #1

    Hi, I found your blog on this new directory of WordPress Blogs at blackhatbootcamp.com/listofwordpressblogs. I dont know how your blog came up, must have been a typo, i duno. Anyways, I just clicked it and here I am. Your blog looks good. Have a nice day. James.

  2. Admin
    September 19th, 2008 at 17:54 | #2

    Thnx James …

    I’ve checking and yes , you right. myblog was appear :)

    Thnx for info.

  1. No trackbacks yet.