PeterJS
05-21-2003, 07:15 PM
Hi,
I was wondering, how would I go about getting this script......
This script redirects guests to the register page:
<script type="text/Javascript">
<!--
if (location.href.indexOf("=register") != -1 || location.href.indexOf("=login") != -1 || location.href.indexOf("=headersfooters") != -1){
}else{
var range = document.body.createTextRange();
range.collapse(true);
while (range.findText("Welcome Guest")) {
document.location="http://USERNAME.proboardsSERVER.com/index.cgi?action=register";
range.collapse(false);
}
}
-->
</script>
...to only redirect once, so that when the guest next visits the script will not redirect that person as the cookie would be stored. I'm not sure how to combine the script with a cookie script.
hope someone can help.
Cheers :)
I was wondering, how would I go about getting this script......
This script redirects guests to the register page:
<script type="text/Javascript">
<!--
if (location.href.indexOf("=register") != -1 || location.href.indexOf("=login") != -1 || location.href.indexOf("=headersfooters") != -1){
}else{
var range = document.body.createTextRange();
range.collapse(true);
while (range.findText("Welcome Guest")) {
document.location="http://USERNAME.proboardsSERVER.com/index.cgi?action=register";
range.collapse(false);
}
}
-->
</script>
...to only redirect once, so that when the guest next visits the script will not redirect that person as the cookie would be stored. I'm not sure how to combine the script with a cookie script.
hope someone can help.
Cheers :)