View Single Post
  #15 (permalink)  
Old December 5th, 2004, 10:27 PM
j_holmes j_holmes is offline
Authorized User
 
Join Date: Dec 2004
Location: welland, ontario, Canada.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I dont undestand what you just said.

Heres my code again:

<script>
function IsValidReferral()
{
from=document.referrer
domainname=from.substring(from.indexOf("//")+2,from.length)
domainname=domainname.substring(0,domainname.index Of("/"))
var referal_list=new Array("home.cogeco.ca","GRIMS_LOGIN/","http://home.cogeco.ca/~grimreaper/");

flag=false;
    for(i=0;i<referal_list.length;i++)
    {
     if(domainname==referal_list[i])
        {flag=true
           break;
        }
    }

    if(!flag)
    {alert("You are Invalid User"+from)
    //It's not a referral site,Move to your login Page
    location.href="http://home.cogeco.ca/~grimreaper/"
    }
      else
      {alert("success")
       }
}
IsValidReferral();
</script>



Note: Array, i tried all individually, named the login page Grims_login


This is how it should all look, right?

Holmes
Reply With Quote