View Single Post
  #1 (permalink)  
Old January 14th, 2016, 06:03 PM
kkrizl kkrizl is offline
Registered User
Points: 15, Level: 1
Points: 15, Level: 1 Points: 15, Level: 1 Points: 15, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2016
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Go to different page based on user's ip address

In my classic asp form page, I am able to create javascript to identify a user's ip address:

<script type="text/javascript">
var ip = "<%=Request.ServerVariables("REMOTE_ADDR")%>";
var intEnt = ip.substring(0,ip.lastIndexOf("."));
var intraIP = "192.168.1";
if (intEnt != intraIP) {
locat = "External";
}
else {
locat = "Internal";
alert(locat);
}
</script>
I need to figure out how I can access the client side variable locat (or use some other method) to go to a page for internal users instead of a page for external users that shows less information when the form is submitted.
Reply With Quote