NuGG 15 Junior Poster

I have obtained the following script which only lets a page load if the visitor has been to the previous page, if they haven’t it sends the visitor to the appropriate page. However, it only works in Mozilla. Can anyone help me adapt this script to work in Internet Explorer?

<SCRIPT LANGUAGE="JavaScript" > 
<!-- Begin
var requiredfrom = "http://domain.com/somepage.htm"; //  required prev. page
if (document.referrer.indexOf(requiredfrom) == -1) {
alert("You must logon first...");
window.location=requiredfrom;
}
//  End --> 
</script>

Cheers,
NuGG

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.