Thursday, January 13, 2011

Javascript, forward to another page according to the refferer URL

<!-- Hide script from old browsers<br>

if (document.referrer.indexOf("facebook") != -1)
//document.write("From facebook")
location.href = "www.yourpage.com";
else
document.write("Not from facebook so we stay on this page")
//-- Stop hiding script -->

No comments: