PDA

View Full Version : drop down menu/link referral help!!



defanair
11-12-2004, 09:47 PM
wondered if anyone could help...

the problem is i have a page
for example : http://www.geocities.com/defanair/defmusic11.html
& i have a wonderful script : http://www.javascriptkit.com/script/cut170.shtml
now the function of this script is to validate the url where the visitor is coming from ... to make sure that people only access defmusic11.html through deftones.html & also defmusic12.html & defmusic13.html

now the valid url script works fine.
the problem i have is all the links (from deftones.html & defmusic 12 & 13.html) to get to defmusic11.html are within in a drop down table..
now for some reason.. that seems to make the link not work.
It says access is denied even though its coming from a page which should be allowed...
now ive tested the valid ur script through a normal <a href> link & it works fine... so can anybody solve the problem..
i really want to keep the drop down menu for the video selection.

when you go to defmusic11.html, view the source & bout line 40 you'll see the valid url script all set up & in place just in the <!-- hidden --> tags so the browser doesn't stop you getting to the page to help me... but this is the code anyway...


<!-- START VALID URL SCRIPT
//http://www.javascriptkit.com/script/cut170.shtml

<script>
<!--

var validreferrals=new Array()
validreferrals[0]="http://www.geocities.com/defanair/deftones.html"
validreferrals[1]="http://www.geocities.com/defanair/defmusic11.html"
validreferrals[2]="http://www.geocities.com/defanair/defmusic12.html"
validreferrals[3]="http://www.geocities.com/defanair/defmusic13.html"


var passed=0

for (r=0;r<validreferrals.length;r++){
if (document.referrer.indexOf(validreferrals[r])!=-1){
passed=1
break
}
}

if (passed==0){
alert("Access Denied!")
history.go(-1)
}

//-->
</script>