RUN SCRIPT

Answered
0
0

hi all,

 

how can i run this script in Wisej

 

<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>

  • You must to post comments
Best Answer
0
0

I attach a little sample that show how to use it

HTH

  • shady rashad
    MORE ….MORE ……… MORE THANKS, for your effort and your example
  • You must to post comments
0
0

Hi Shady

Have you seen the Geolocation extension?

https://github.com/iceteagroup/wisej-extensions/tree/2.5/Wisej.Ext.Geolocation

 

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.