PeterJS
05-10-2003, 06:14 PM
Hi,
I have been trying to a make a script for our forum, so that guests will be redirected to register, but I can't seem to get it to work......
<script type="Text/JavaScript">
for(var i=0 ; i<document.links.length ; i++) {
if(document.links[i].innerText=="Your Instant Messages:") ***something needs to go it to sort of like cancel it, as I don't want it to do anything if it finds Your Instant Messages:
}else{
location.href ="My URL to register page;}
</script>
When a member is logged in, the text on the page that is only visible to members is - Your Instant Messages: , to guests they can't see this, so they will be redirected to the register page. But if you look in the script I don't know how to sort of like cancel it to do nothing if it is a member that's logged in.
Peter :)
I have been trying to a make a script for our forum, so that guests will be redirected to register, but I can't seem to get it to work......
<script type="Text/JavaScript">
for(var i=0 ; i<document.links.length ; i++) {
if(document.links[i].innerText=="Your Instant Messages:") ***something needs to go it to sort of like cancel it, as I don't want it to do anything if it finds Your Instant Messages:
}else{
location.href ="My URL to register page;}
</script>
When a member is logged in, the text on the page that is only visible to members is - Your Instant Messages: , to guests they can't see this, so they will be redirected to the register page. But if you look in the script I don't know how to sort of like cancel it to do nothing if it is a member that's logged in.
Peter :)