Hey dudes,
I found this script to auto insert location into a website -- problem is i don't know how to use it! Do you have to create a .js file with this code in it, then add a piece of code on the page where you want the location to be displayed? Anyone know?
Thanks ahead!
<script type="text/javascript"
src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
if (typeof(google.loader.ClientLocation.address.city) != null) {
document.write(google.loader.ClientLocation.address.city
+", "
+google.loader.ClientLocation.address.region);
} else {
document.write("Unknown location")
}
</script>
I found this script to auto insert location into a website -- problem is i don't know how to use it! Do you have to create a .js file with this code in it, then add a piece of code on the page where you want the location to be displayed? Anyone know?
Thanks ahead!
<script type="text/javascript"
src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
if (typeof(google.loader.ClientLocation.address.city) != null) {
document.write(google.loader.ClientLocation.address.city
+", "
+google.loader.ClientLocation.address.region);
} else {
document.write("Unknown location")
}
</script>