Jump to content

Geolocation wont work!


Recommended Posts

I am using chrome. why the geolocation wont showing getLocation i checked on my advance setting there is no necessarily checkbox "Send a "Do Not Track" request with your browsing traffic"


I am not sure what excalty the file will go through from the document.getElementById("demo").


I checked at http://www.w3schools.com/html/html5_geolocation.asp it does not help me


please help me to success what did i wrong anyone who have experienced this problem before





I am using IDE note++

here the code is


<!DOCTYPE html>
<p>Click below to get your coordinates:</p>
<button onclick="showLocation()">Click</button>
var x = document.getElementById("demo");
function getLocation()
if (navigator.geolocation)
else{x.innerHTML = "Geolocation is not supported by this browser.";}
function showPosition(position)
x.innerHTML = "Latitude: " + position.coords.latitude + "<br>Longitude: " + position.coords.longitude;
Edited by davej
Link to comment
Share on other sites

I made the video making things of thousand description what is going on and easier for you to understand https://www.youtube.com/watch?v=igM41r4Rzko&feature=youtu.be


it only give a minute.


you will see the setting on chrome there have three checkboxs on list.


w3school.com is working


notepad++ is NOT working???????????????????? seem its not right... it wont let me approved or blocked in somewhat.


please help thanks!

Edited by ironheartbj18
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...