Let's Go Back To Photoshop's Beginning

Perhaps you may be wondering how Photoshop started? Or perhaps you do not care so long as it is there to bring life to images, photos and texts you will be fine?

Whatever the reason may be, it is still better to look back in order to move further...

[Read more]

| Home | Sitemap |

Articles   

Hide the Target URL of a Link in Status Bar

There are some instances where you have redirect the user through one page to get them to another page. There is a way to do this stealthily - without letting the user know that there was a redirect. Yes - it sounds evil - but it don't have to be.

Say you have a click tracking software - you have to track each click the users make. To do that you need a redirecting page what will track the clicks. Hopefully, the following illustration will make things clearer. You don't want the user to see that you are passing through the middle page. Usually, the URL will flash in the address bar for just a second(or less) - so we don't have to worry about that. We just have to prevent the URL from appearing in the status bar when the user hovers over the link.

There are three methods to do this. * Change the status text. * Hijack and stop the click event and redirect page. * Make an Ajax call on click event. Changing Status Text This is the old method. This uses the window.

status property to show a different URL to the user. Simple and easy method - but it rarely works now a days. This method has been abused by malicious sites a lot - so most browsers have disable this option. In Firefox, you can find that option at Tools -> Preferences -> Content -> Enable Javascript(click on the 'Advanced' Button) -> Change status bar text. If that's checked, you can use window.status to change the status bar text.

But its disabled by default. But if you still want to use this method(not recommended), this is how to do it. Go To Mysite Hijacking Click Event In this method, when the user clicks on the link, the script captures the click event and stops it. This will prevent the browser from opening up the target page. Then we use location.href to go to the new page.

Sample code below. HTML Code Go To Mysite Javascript Code function init() { document.getElementById("Mysite-link").onclick=function(e) { e=e||window.

event; stopEvent(e); location.href="click_counter.php?redirect_to=http://yoursite/"; return false; } } window.onload=init; Ajax Method This is for all you web 2.

0 fans. Ajax method simply makes a call to the counter server side script on the click event. This is perhaps the best method of all - as the counter URL doesn't appear at all. Needless to say, the server side script used here will be different from the one used in the other methods - there is no redirection here. The code is very simple as well.

HTML Code Go To Mysite Javascript Code function init() { document.getElementById("Mysite-link").onclick=function(e) { jx("counter.php?url="+escape("http://yoursite/")); //Use your favorite ajax library here.

} } window.onload=init; .

Posted By Smyrna Web Hosting



Adobe PhotoShop






The Need For Remote Backups - Remote backups are taken simultaneously offsite on a different server and hence are almost always reliable.

Get Great Prices and Bargains In Computer Sales - It is important when you begin looking for computer sales that you have a clear understanding of what you want not only in the seller, but in the product as well.

What is Web Hosting - Web hosting is a type of internet hosting service that allows people to make their websites via the world wide web.

How To Choose Between a Laptop Notepad or a Desktop Computer - Thinking of buying a new computer? Learn the difference between laptop, notepad and desk top comuters.

Photo Printing Essential Tips for Getting the Colour Right - There have been massive advances in colour printing technology in the last few years, but why does the apparently straightforward task of creating good quality colour prints from digital photo systems still cause such trouble for many people?.

more...
©Copyright 2010 51Photoshop.com. All rights reserved.
Unauthorized duplication in part or whole strictly prohibited by international copyright law.