LampStone
09-08-2003, 01:05 PM
Hello, this is my first post. I am very new to js and I have a problem.
I used a free referred page script in a FP web page thinking it would prevent people from accessing a quiz without paying for it. Well it didn't work the way I intended to so I deleted the code and tried a different route. This route worked on two of my pages, but on the third one - the old js is still there and I cannot find it for the life of me. (Well, I found where it is located - in a temp internet file - but I cannot get to it.
Here is the origianal script:
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
var requiredfrom = "index.html"; // required prev. page
if (document.referrer.indexOf(requiredfrom) == -1) {
alert("You must come to this page from " + requiredfrom);
window.location=requiredfrom;
}
// End -->
</script>
And here is my revised script for my page:
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
var requiredfrom = "https://www.paypal.com/"; // required prev. page
if (document.referrer.indexOf(requiredfrom) == -1) {
alert("You must come to this page from " + requiredfrom);
window.location=requiredfrom;
}
// End -->
</script>
I realized after I did this that it wouldn't work - because it is coming from the "confirmation" page link I set up WITHIN paypal button creator - and so - I don't have the right 'requiredfrom' page - since it is secure! So -
now I am stuck with this "loop" and can't figure out how to get rid of it.
Thanks for helping me.
(And I was just starting to like js!)
Regards,
LampStone
I used a free referred page script in a FP web page thinking it would prevent people from accessing a quiz without paying for it. Well it didn't work the way I intended to so I deleted the code and tried a different route. This route worked on two of my pages, but on the third one - the old js is still there and I cannot find it for the life of me. (Well, I found where it is located - in a temp internet file - but I cannot get to it.
Here is the origianal script:
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
var requiredfrom = "index.html"; // required prev. page
if (document.referrer.indexOf(requiredfrom) == -1) {
alert("You must come to this page from " + requiredfrom);
window.location=requiredfrom;
}
// End -->
</script>
And here is my revised script for my page:
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
var requiredfrom = "https://www.paypal.com/"; // required prev. page
if (document.referrer.indexOf(requiredfrom) == -1) {
alert("You must come to this page from " + requiredfrom);
window.location=requiredfrom;
}
// End -->
</script>
I realized after I did this that it wouldn't work - because it is coming from the "confirmation" page link I set up WITHIN paypal button creator - and so - I don't have the right 'requiredfrom' page - since it is secure! So -
now I am stuck with this "loop" and can't figure out how to get rid of it.
Thanks for helping me.
(And I was just starting to like js!)
Regards,
LampStone