geocoder.geocode() not being executed
<p>I'm using the geocoding API to convert an address to long and lat, and then assigning a hidden input value with the recieved coordinates, instead of using this data to plot on a map.</p>

<p>I'm using the client facing <a href="https://developers.google.com/maps/documentation/javascript/examples/geocoding-simple" rel="nofollow">javascript library</a>, and here is my javascript which is slightly modified.</p>

<pre><code>&lt;script&gt;
        function initMap() {
            var geocoder = new google.maps.Geocoder();
            geocodeAddress(geocoder);
            console.log('initMap');
        }

        function geocodeAddress(geocoder, resultsMap) {
            var address = document.getElementById('address').value;
            console.log('geocodeAddresses');

            geocoder.geocode({'address': address}, function(results, status) {
                console.log('geocoder.geocode');
                if (status === google.maps.GeocoderStatus.OK) {
                    console.log('status OK');
                    document.getElementById('lnglat').value = results[0].geometry.location;
                    console.log(results[0].geometry.location);
                    } else {
                    console.log('status error');
                }
            });
        }
    &lt;/script&gt;
</code></pre>

<p>When I see the output in firebug, I can see "initmap", "geocodeAddresses" however nothing from geocoder.geocode.</p>

<p>I can't see any reason why, I'm not getting any errors in firebug, all of the required files are there and my API key is included and valid.</p>

<p>Thanks for your time</p>

<p><strong>Edit:</strong> It appears as though geocoder.geocode isn't run at all, when I add a console.log at the end of geocodeAddress, it completely skips geocoder.geocode. Why would this be as no errors are shown in firebug.</p>