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

Please support our Site Layout and Usability advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Feb 2005
Posts: 92
Reputation: NuGG is an unknown quantity at this point 
Solved Threads: 1
NuGG's Avatar
NuGG NuGG is offline Offline
Junior Poster in Training

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

 
0
  #1
Nov 23rd, 2005
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Site Layout and Usability Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC