Geo Location extracted from visitors ip address

Νίκος Gr33k nikos at
Sat Jul 6 22:51:52 CEST 2013

Στις 6/7/2013 11:32 μμ, ο/η Tim Chase έγραψε:
> Can you be more specific please about using the aforementioned
>> HTML5 location API ?
> It's client-side JavaScript.

so, i must edit my cgi script and do this:

print '''
var x=document.getElementById("demo");
function getLocation()
   if (navigator.geolocation)
   else{x.innerHTML="Geolocation is not supported by this browser.";}
function showPosition(position)
   x.innerHTML="Latitude: " + position.coords.latitude +
   "<br>Longitude: " + position.coords.longitude;

Will that do the trick?

but then again i want the city to be stored in the city variable.
Somehow the above javascript code mu return me a value that i will the 
store at variable "city".

I don't know how to do that.

What is now proved was at first only imagined!

More information about the Python-list mailing list