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

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:

    dim ipToCheck, incomingIP
	if request.form("parcelnumber") <> "" then
		ipToCheck = ""
		incomingIP = request.ServerVariables("REMOTE_ADDR")
		if ipToCheck <> incomingIP then
			response.redirect("" & request("parcelnumber"))
			response.redirect("" & request("parcelnumber"))
		end if
	    response.write "Going no where becasue 'parcelnumber' was blank "
	end if
  <title>IP Test</title>
    <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">
    <input name="Reset" type="reset" id="Reset" value="Reset">
Wind is your friend
Reply With Quote