Javascript Help Needed

  • Started
  • Last post
  • 0 Responses
  • emerritt

    Can you have a look at this and tell me what's wrong with it. It's sending me back to the login page even if I just came from there.

    var myref=document.referrer;

    if(myref == 'http://www.brock.ac.uk/cove/log...
    {
    alert("welcome");
    }
    else
    {
    window.location.href = 'http://www.brock.ac.uk/cove/log...
    alert("try again");
    }

    Cheers, Ed.