title: geocoding google map doesn't work
body: <p>I have a problem with my script.
  I have everything set correctly but the geocoding does not work, when I enter the name of a city in the form that I created then I click on "geocoder" it nothing happens.
  This is my code : </p>
  
  <p><strong>Variable :</strong> </p>
  
  <pre><code> var geocoder;
   var map;
   var markers = new Array();
   var i = 0;
  </code></pre>
  
  <p><strong>Geocoding Script :</strong> </p>
  
  <pre><code>&lt;!-- GEOCODER --&gt; 
    function codeAddress() {
  var address = document.getElementById("address").value;
  geocoder.geocode( { 'address': address}, function(results, status) {
    if (status == google.maps.GeocoderStatus.OK) {
              document.getElementById('lat').value = results[0].geometry.location.lat();
              document.getElementById('lng').value = results[0].geometry.location.lng();
      map.setCenter(results[0].geometry.location);
      var marker = new google.maps.Marker({
          map: map, 
          position: results[0].geometry.location
      });
              markers.push(marker);
              if(markers.length &gt; 1)
                  markers[(i-1)].setMap(null);
              i++;
    } else {
      alert("Le geocodage n\'a pu etre effectue pour la raison suivante: " + status);
    }
    &lt;!-- GEOCODER --&gt; 
  </code></pre>
  
  <p><strong>Form:</strong></p>
  
  <pre><code>  &lt;div&gt;
  Adresse : &lt;input id="address" type="text" value="paris"&gt;   
  &amp;nbsp; &lt;input type="button" value="Geocoder" onsubmit="codeAddress()"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Full code ( Only html) : <a href="http://jsfiddle.net/hCmQb/" rel="nofollow">http://jsfiddle.net/hCmQb/</a></p>