var geoopt={ enableHighAccuracy: false, maximumAge: 3600000, timeout: 27000 }; function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition, geoerror, geoopt); } } function geoerror() { } function showPosition(position) { $.ajax({ url: '/js/llpos.php?lat=' + position.coords.latitude + '&lon=' + position.coords.longitude, type: "GET", async: false, success: function (ergebnis) { location.reload(); } }); }