Hello, I wonder if anyone can help me?
I have a page on my site which I want people to be able to access only by clicking on a link from another page within my site – i.e I do not want them to be able to go their directly.
After trawling various sites I managed to make my own code.
<SCRIPT LANGUAGE=”JavaScript”>
var requiredfrom = “
var redirect =”
if (document.referrer.indexOf(requiredfrom) == -1) {
alert(“Access Denied”);
window.location=redirect;
}
</script>
To my suprise it actually worked – hwoever upond testing it out in IE it just redirects to the error page.
Any tips? I must point out I am a design rather than a coder – hence the probably stupid attempt at doing it myself!
Thanks
JP