So I'm trying to use a free service to get the visitor's location and redirect them to the proper page. The problem is that these free services don't always work; freegeoip has a limit of 10000 requests per day and I'm not sure about telize.
What I want to do is to load another json if the initial one fails.
To be honest I don't know if it is possible my way. I apreciate any other ideas or scripts, the main idea is just to get the visitor's location and point them to the right page, using javascript. I'm on Blogger, by the way, so not so many options available.

  dataType: "json",
  url: 'http://www.telize.coom/geoip?callback=?',
  cache: true,
  success: function(location) {
if (location.country_code == 'ID') { = '';
else if (location.country_code == 'US') { = '';
error: function(location) {
jQuery.getJSON('', function(location) {
if (location.country_code == 'ID') { = '';
else if (location.country_code == 'US') { = '';

This may not be the answer your looking for but i would fire off both requests and use the first one that responded correctly.

Member Avatar

there is no such thing as an ajax.jquery function

commented: gfh +0
commented: hyepr active +0