google map find latlng
<p>I used the google map api to find the co-ordinates of addresses. I used this function</p>

<pre><code>function searchLocations() {
     var address = document.getElementById("addressInput").value;

     var geocoder = new google.maps.Geocoder();

     geocoder.geocode({address: address}, function(results, status) {
       if (status == google.maps.GeocoderStatus.OK) {
        searchLocationsNear(results[0].geometry.location);
       } else {
         alert(address + ' not found');
       }
     });
   }
</code></pre>

<p>the "addressInput" i get from html form</p>

<pre><code>&lt;input type="text" id="addressInput" size="10"/&gt;


    &lt;input type="button" onClick="searchLocations()" value="Search"/&gt;
</code></pre>

<p>I alert the var address it catches the address, means function work correctly. But it is not converting the address into latitude and longitude. please tell me where i am wrong</p>
