I'm trying to write a script that depending on theier IP address the link will change to a different website.
I only normaly wirte in VBA, so as you can guess the code below doesn't work!!! any ideas on what I'm doing wrong?!?
<HTML>
<HEAD>
<TITLE></TITLE>
<SCRIPT LANGUAGE="JavaScript">
function ChangePage(){
UserIP = Request.ServerVariables("Remote_Addr")
if ("UserIP" = '1.1.1.1')
document.location =' else
document.location ='}
</script>
</head>
<BODY>
<P>Go to ;</P>
<a href="javascript:ChangePage();">Test</a>
</BODY>
</HTML>
I only normaly wirte in VBA, so as you can guess the code below doesn't work!!! any ideas on what I'm doing wrong?!?
<HTML>
<HEAD>
<TITLE></TITLE>
<SCRIPT LANGUAGE="JavaScript">
function ChangePage(){
UserIP = Request.ServerVariables("Remote_Addr")
if ("UserIP" = '1.1.1.1')
document.location =' else
document.location ='}
</script>
</head>
<BODY>
<P>Go to ;</P>
<a href="javascript:ChangePage();">Test</a>
</BODY>
</HTML>