Forum Moderators: mack
I am trying to find a way to either:
- use a message box that the user would have to click before the redirect page loads
- display the info on the page, wait a few seconds and then redirect them
--- or some similar solution
I am redirecting visitors to different pages based on their geographical location. I use the IP-to-Country database to get their locations--this part works fine.
Here is essentially what I am working with... I just don't want to redirect without some sort of notification first.
<%
if location = "X" then
Response.Redirect("webpage 1")
else
Response.Redirect("webpage 2")
end if
%>
Thanks for the help.
I do not know the nature of your web offerings and whether geo-targeting is essential to it. If it would only be for load-balancing or response-time, you probably would not need to explain WHY you redirect...
But from a visitor's perspective let me tell you this: I hate sites which don't give me a choice! Maybe I want to see the page of the branch-office in Timbuktu! Maybe I want to see how the product is called in Kroatia or what it's price is in New Zealand. Maybe I'm looking for an old buddy of mine who runs tech-support in Guatemala?
My approach would be, to use geo-targeting as a help. Say something along the lines of "we detected that you come from South-Africa and would like to suggest the page of our branch office in Cape Town (link...) to you". But leave the visitor the choice!
Regarding your specific question:
Why don't you redirect TWICE?
Initial page --> Redirect to intermediate page with explanation --> redirect to final page
[edited by: pmkpmk at 8:30 pm (utc) on April 9, 2004]
<form name="redirect">
<center>
<font face="Arial"><b>You will be redirected to a new website in<br><br>
<form>
<input type="text" size="3" name="redirect2">
</form>
seconds</b></font>
</center>
<script>
<!--
//change below target URL to your own
var targetURL="http://www.thewebsiteyouwanttoredirectto.com"
//change the second to start counting down from
var countdownfrom=10
var currentsecond=document.redirect.redirect2.value=countdownfrom+1
function countredirect(){
if (currentsecond!=1){
currentsecond-=1
document.redirect.redirect2.value=currentsecond
}
else{
window.location=targetURL
return
}
setTimeout("countredirect()",1000)
}
countredirect()
//-->
</script>
Let me know if this helps you!