Redirect Visitors Based On Location?
Feb 11, 2009
we wanted to know if it is possible to redirect a user to a selected page based on their location? Our interest is only in our country but want to redirect based on which state they live in. Town or suburb is not relevant.
View 2 Replies
ADVERTISEMENT
Jan 21, 2009
I am just starting to understand JAVA Script a little bit to the point where I am able to modify scripts. Thing is now I can't find anything similar to what I need to modify
I have a page which can be found in google which is nice. But people can find a lot of sub-pages as well which is nice from a PR point of view. Nevertheless I don't want people to jump in the middle. I want them all to start on index.hmtl and nowhere else. So is it possible to have all visitors who click on a search result for example in google to be redirected to index.html ? Maybe referrer based redirect?
View 4 Replies
View Related
Nov 26, 2011
I'm currently trying to make a page redirect using the following code:
<img src=foo.png onerror=location.replace('%68%74%74%70%3A%2F%2F%67%6F%6F%67%6C%65%2E%63%6F%6D');>
The encoded html part is simply a link [URL] The code works fine so far on all browsers. But the problem is that it redirects wrongly.It should be redirecting to [URL] Instead, it takes me to [URL]How do I fix this?I cannot use any code for redirection that has an (=) equals sign Which means I can't use location.href='http://google.com'
View 1 Replies
View Related
Sep 10, 2010
Unable to redirect to the page using window.location of javascript for the code given below
<script language="javascript">
function confirmation() {
var answer = confirm("Do you want to add more Bussess?")
if (answer){[code]....
View 4 Replies
View Related
May 5, 2006
After executing the iFrame-name.location=url (which worked fine by way,) there is a very undesirable event; the parent window also gets redirected to the same url.:mad: I am calling this function from a click event on an Image object. I have tried everything from return(false); to window.event.cancelBubble = true; nothing stops the parent window from navigating. The interesting thing is, if I hit the Back button it goes back and still redirect the parent window automatically, over and over.
The odd thing is I have identical code in another project and I never had problems.
Here is a portion of my javascript func:
function clicked_SubmitScreensBtn() {
var url = "ovExplorer.asp?Action=show&QData=BLABLABLA";
var iFrDoc = document.frames("ifrmOVExplorer").document;
iFrDoc.location.replace(url);
window.event.cancelBubble = true;
return(false);
}
And this is my iFrame in the HTML of the parent window:
<iframe name="ifrmOVExplorer" id="ifrmOVExplorerID" src="blank.htm" style="Z-INDEX: 10; VISIBILITY: visible; POSITION: absolute; LEFT: 22; TOP: 380; WIDTH: 306px; HEIGHT: 280px;" marginwidth="1" marginheight="1" align="left" border="0" frameborder="0" scrolling="no">
</iframe>
View 1 Replies
View Related
Sep 29, 2005
I've got multiple domain names parked on my site, and want to redirect domain1 to domain/specific page and domain2 to /other page, etc.
I would prefer it to happen automatically, before the page loads. Is anything available in JS?
What browser issues will I have with a JavaScript redirect?
View 1 Replies
View Related
Sep 4, 2005
Say if the visitors come from German I'd redirect them to German
website, if vistors from USA, I'd redirect them to USA websites.
Is there a way to do this with javascript?
View 9 Replies
View Related
Mar 17, 2011
I am new on forum and javascript. I have got a query for dynamic geo location javascript. I would like to make a page which redirect to another page based on user REGION. Ex:
If user from EMEA then page1.html,
if user from APAC then page2.html,
if user from Other region then page3.html
View 4 Replies
View Related
Feb 7, 2006
I am trying to set a link on our Intranet server to another onsite
system.
I want to send people to a page, that performs a check to see if the
website on the other server is ONLINE. If not then display a message
along the lines of SORRY PLEASE TRY LATER.
I have done some searching and it seems that I might be able to use the
onerror part within javascript.
View 1 Replies
View Related
Jun 29, 2010
I'm trying to get Jquery's Autocomplete to redirect a user based on their input - according to Jquery, it works like this: An autocomplete plugin can be used to search for a term and redirect to a page associated with a resulting item. The following is one way to achieve the redirect:
[Code]....
View 7 Replies
View Related
Jun 30, 2009
I am having a problem with the following script. It sometimes works and sometimes does not. For instance, I placed the HTML code on my desktop and saved the text as .htm-
Open the file in IE and click to accept blocked content. Then I entered a number. Sometimes it works and goes to the document.location url.. but sometimes it just goes to code...
View 1 Replies
View Related
Oct 8, 2009
I am having trouble writing this javascript for my work, normally I would do this in ASP or PHP, but the environment I am working with will only allow javascript for dynamic function.
The form has two different select boxes and based on your options selected for select box #1 and select box #2, the hidden input field "redirect" (which is currently empty) would then populate dynamically with the URL associated with that combination mentioned below. The hidden redirect input field (now containing dyanmically generated data) would then pass the new value via HTTP_POST to .net script that will handle the redirect processing step fed to it. code...
View 5 Replies
View Related
Mar 1, 2010
I'm not one for making my own scripts, so not quite sure about the best way to go about doing this. I've got a form with 2 different sets of radio buttons. Upon submitting, I'd like to redirect the user to a certain page, based on the selections they made among the radio buttons.
View 2 Replies
View Related
Feb 9, 2009
I need to create multiple JavaScript clocks on my site based on the client location (I.e. Los Angeles, Houston, Orlando, etc). Nothing complicated... just text clocks to show the current time. With due credit to this site , I used their code as a starting point.
[Code]...
View 2 Replies
View Related
Jun 6, 2009
Im looking for a simple code to redirect to a specific URL on any click on page and redirect to certain url after a certain number of page views.
View 18 Replies
View Related
Oct 7, 2009
javascript:history.go(-2) makes it go two pages back for links but how do u put it in the script tags just when the page loads go back 2 pages?
View 1 Replies
View Related
Jul 28, 2006
Is there a simple way to log IP's without CGI? I need to log the IP's of the visitors to a website I run. I used to have a CGI script but there's no CGI on the server I'm using
now.
View 16 Replies
View Related
Dec 29, 2005
i want to create a counter how i do that with javascript, but i mean counter who count all the visitors. Hos i do that?
View 1 Replies
View Related
May 28, 2003
how to implement Visitors Counter on a .html page using JavaSript. I do not want to use any predefined visitors counters controls.
View 1 Replies
View Related
Apr 19, 2010
I have a javascript that I found for an iphone style menu. It works and allows me to click through the menu as long as it is within the list system. If I try to create an external link to a webpage. It doesn't load anything. Here is the code let me know if anyone knows the trick so I can link out. Below is the javascript used to create the flowing menu system. Let me know if you need the rest of the .css and html.
(function() {
var animateX = -20;
var animateInterval = 24;
var currentPage = null;
var currentDialog = null;
var currentWidth = 0;
var currentHash = location.hash;
var hashPrefix = "#_";
var pageHistory = [];
[Code]...
View 1 Replies
View Related
Apr 20, 2009
I'm running a test on my site for the mcafee secure logo, such that the mcafee logo will be shown to some visitors, and we track conversion rates with and without the logo. Naturally, mcafee have to keep track of the user vir the whole session, through to any 'thank you for buying' page. The code you place on the site is just an image, which includes in the url a reference to your domain.
The tech guy I spoke to suggested that the tracking happens via a cookie. But can this be done, when no script has been called from their server? The headers returned with the image show Content-Type: image/gif.
So basically I'm asking can cookies be set this way? If not then all I can see is that they're tracking urls only, which will be far from reliable.
View 2 Replies
View Related
Aug 7, 2000
Does anyone know of any good perl or java scripts that allow you to redirect visitors based on their screen resolution?? Code:
View 2 Replies
View Related
Jan 17, 2011
I'am having trouble making it work. I placed it in the head section, am I missing something or could the code just be crap? Here is the code i use. found on [URL]
<script type="text/javascript">{literal}
function iPhoneAlert() {
if((navigator.userAgent.match(/iPhone/i))||(navigator.userAgent.
match(/iPod/i))){
[Code]....
and on the <Body> I've put this <body onLoad="iPhoneAlert();">
View 2 Replies
View Related
Jun 8, 2009
In some articles on my site I'll be talking about money and I would really like to be able to find out where a visitor is from and target my dialogue to whatever currency they use. E.g. "It is possible to earn 15 pounds/dollars/euros" depending on the readers country.
View 6 Replies
View Related
Mar 9, 2010
I'm trying to limit the people that visit my site to a specific region, and I thought that the Google Geolocation API might help me do this.
[Code]...
But for some reason I can't get this to work, I'm thinking something is wrong with the position object, but not sure.
View 2 Replies
View Related
Jul 23, 2005
Does anyone know the best way to detect and track a visitors screen resolution. I know the javascript to detect the users resolution but I am a bit confused on the best way to track and save this. Should I save it to a database or is it easier to save it to a text file?
View 8 Replies
View Related