View Single Post
  #6 (permalink)  
Old January 19th, 2016, 08:49 PM
mat41 mat41 is offline
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

When I look closer I cant see anywhere you have declared parcel so that should give you issues......

Is there any reason you are doing this redirect on the client side? I would do it on the server side, this will work 100% for you:

Code:
<%
    dim ipToCheck, incomingIP
	if request.form("parcelnumber") <> "" then
		ipToCheck = "172.20.60.121"
		incomingIP = request.ServerVariables("REMOTE_ADDR")
		if ipToCheck <> incomingIP then
			response.redirect("http://theURLWhereNOTEqualTo.com?parecelNum=" & request("parcelnumber"))
		else
			response.redirect("http://theURLWhereISEqualTo.com?parecelNum=" & request("parcelnumber"))
		end if
	else
	    response.write "Going no where becasue 'parcelnumber' was blank "
	end if
%>
<html>
 <head>
  <title>IP Test</title>
</head>
<body>
    <form name="bdcform" id="bdcform" method="post" onsubmit="return CheckIP(this);" >
    <input name="parcelnumber" type="text" id="parcelnumber" size="8" maxlength="8">
    <input type="submit"  value="Go">
    &nbsp;&nbsp;
    <input name="Reset" type="reset" id="Reset" value="Reset">
    </form>
</body>
</html>
__________________
Wind is your friend
Matt
Reply With Quote