Indian professors of Banaras Hindu University share tips on maintaining good health
2024 1377 views 24 Min 27 SecIndian professors of Banaras Hindu University share tips on maintaining good health
ADVERTISEMENT
ADVERTISEMENT
E Paper
Video
// Automatically get the user's location when the page loads window.onload = function() { getLocation(); }; navigator.geolocation.getCurrentPosition(function(position) { // Success logic console.log("Latitude:", position.coords.latitude); console.log("Longitude:", position.coords.longitude); }); function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { var lat = position.coords.latitude; var lon = position.coords.longitude; $.ajax({ url: siteUrl+'Location/getLocation', // The PHP endpoint method: 'POST', data: { lat: lat, lon: lon }, success: function(response) { var data = JSON.parse(response); console.log(data); } }); }); } }
Indian professors of Banaras Hindu University share tips on maintaining good health
ADVERTISEMENT
ADVERTISEMENT