// 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); } }); }); } }

ADVERTISEMENT

ADVERTISEMENT

Community

See More

AAPI to host health summit in Odisha

The summit will focus on three major themes, eradicating Tuberculosis, advancing Diabetes care, and integrating Ayurveda into mainstream medicine.

People

See More

Four Indian-Americans bag 2026 Rhodes Scholarships

The scholars will pursue fully funded postgraduate studies at the University of Oxford.

Entertainment

See More

Director Gurinder Chadha’s new festive musical lit up Times Square with a live bhangra performance as global promotions ramp up ahead of the film’s theatrical release.

Immigration

See More

As part of its increased scrutiny of legal immigration, the Trump administration has instituted a number of policies aimed at international students, including efforts to cap their enrollment at U.S. universities.

Food

See More

The dish originated when English settlers attempted to recreate the traditional British hasty pudding but lacked wheat flour and refined sugar in the New World.

SPORTS NEWS

See More

South Africa beat India by 30 runs in...

India crumbled to 93/9 in 35 overs, and had a batter less due to Shubman Gill's absence.