I just did a test on your code and the java
script files is getting called
function getLocation() {
alert("GetLocaiton Function called");
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
}
else {
x.innerHTML = "Geolocation is not supported by this browser.";
}
}
if your else part, you have x.innerHTML but there is no element called 'x' in your code ?