So, im defining my variable, then trying to get this to write the content in the array that is specified if it returns one of the referrers true.. For some reason it only displays mycontent[0] even though i’ve defined to print mycontent[1].. can anybody tell me where i went wrong?
[CODE]
<script type=”text/javascript”>
var referrer= “www.google.com”;
var mycontent = new Array();
mycontent[0]=’no from yahoo because..’
mycontent[1]=’no from google because..’
mycontent[2]=’no from msn because..’
if (referrer = “www.yahoo.com”) {
document.write(mycontent[0]);
}else if (referrer = “www.google.com”)
{document.write(mycontent[1]);
}else if (referrer = “www.msn.com”)
{document.write(mycontent[2]);
}else {
document.write(‘NO MATCH’);
}
</script>