I know I didn't use the right terminology here but when I load this page, in the upper left in Firefox it says the data is still trying to load, yet it shows me the right data.
Why would this script below cause this error and not complete the call?
Second question: What are the best terms to describe this action of "not loading" and still showing the spinning icon in browser?
Here is the full code:
<?
$geoLong = $_POST[geoLong];
$geoLat = $_POST[geoLat];
?>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script>
$( document ).ready(function()
{
$.ajax({ url:'http://maps.googleapis.com/maps/api/geocode/json?latlng=<? echo "$geoLong,$geoLat";?>&sensor=true',
success: function(data){
document.write("City="+data.results[0].address_components[3].long_name);
document.write("&Country="+data.results[0].address_components[6].long_name);
/*or you could iterate the components for only the city and state*/
}
});
});
</script>