I am a total to programming newbie. Including php, html and javascript I have part of a program for retrieve the current location via javascript…using geolocation…
<script>
var x = document.getElementById("demo");
function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
} else {
x.innerHTML = "Geolocation is not supported by this browser.";
}
}
function showPosition(position) {
x.innerHTML = "Latitude: " + position.coords.latitude +
"<br>Longitude: " + position.coords.longitude;
}
</script>
My problem is i need to get the current location’s Longtitude & Latitude information to generate a new web page link & load that new page … All this to be in javascript.
Example :
…new.php?w1=2.9272622,101.73036820000002
This new page is working perfectly… no problem.
Any Help Is Very Much Appreciated… Thank You In Advance From A Very Newbie…
Azlan