944,095 Members | Top Members by Rank

Ad:
Nov 23rd, 2005
0

"Must visit from" javascript wont work in IE...

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 1
Junior Poster
NuGG is offline Offline
110 posts
since Feb 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Site Layout and Usability Forum Timeline: Http 500 -internal Server Error
Next Thread in Site Layout and Usability Forum Timeline: Disallowed_Parent_Path





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC