Href passes referrer

[Total: 0    Average: 0/5]

This script shows how to have a url with the referrer url tagged onto it as a parameter.

Body Code:

<script language="javascript"> 
var curdate; 
var ms; 
var ms1; 
var today = new Date() 

Today = new Date(); 
ms = Today.getMonth() + 1 + "/" + Today.getDate() + "/" + Today.getFullYear(); 
ms1 = Today.getHours() + ":" + Today.getMinutes(); 
curdate = ms + " " + ms1; 
var next_page=document.location.toString();
if(document.location.toString().indexOf("Ref=")==-1)
  next_page+="?Ref="+escape(document.referer); 
if(document.location.toString().indexOf("Date=")== -1) 
{ 
 next_page+="&Date="+escape(curdate);
} 
document.write("<a href='"+next_page+"'>"+next_page+"</a>");
</script> 

Times Viewed: 7

Leave a Reply

Your email address will not be published. Required fields are marked *