I am not a programmer, and this is driving me nuts. I have a script using google geolocation to display user city and state.
In the < head> section I have
and in the body I have inserted
where I want the message and location to display. I set this up several months ago and it worked fine. I now go back to the site and it displays nothing, just a blank space. I have found multiple examples online of how to do this using pretty much exactly what I have. Where am I going wrong?
In the < head> section I have
Code:
<script src="http://www.google.com/jsapi?key=myapikeyishere" type="text/javascript">
</script>
Code:
<script type="text/javascript">
if (typeof(google.loader.ClientLocation.address.city) != null) {
document.write("Blah blah blah you're in "
+ google.loader.ClientLocation.address.city + ", "
+ google.loader.ClientLocation.address.region);
} else { document.write("Location not detected") }
</script>