title: Google Map Api v3 : fire an action when clicking a button in a infowindow
body: <p>I add markers on a map with the 'rightclick' action.
  Each marker has its specific infowindow and each infowindow has a form into it.</p>
  
  <p>When I create more than one marker, my code only triggers the first infowindow values, not the good one.</p>
  
  <pre><code>google.maps.event.addListener(map, 'rightclick', function(event) {
    var marker = new google.maps.Marker({
      map: map,
      draggable : true,
      position: event.latLng,
      animation: google.maps.Animation.DROP,
    });
  
    var geocoder = new google.maps.Geocoder();
  
    geocoder.geocode({'latLng': event.latLng}, function(results, status) {
      if(status == google.maps.GeocoderStatus.OK) {
        var html = "&lt;div class='infobox'&gt;";
        html += "&lt;p&gt;";
        html += "&lt;strong&gt;Lieu : &lt;/strong&gt;";
        html += results[0]['formatted_address'];
        html += "&lt;/p&gt;";
  
        html += "&lt;p&gt;";
        html += "&lt;strong&gt;Nombre de place (~) : &lt;/strong&gt;";
        html += "&lt;input type='text' class='form_input' name='nb_place' id='nb_place' /&gt;";
        html += "&lt;/p&gt;";
  
        html += "&lt;p&gt;";
        html += "&lt;strong&gt;Point d'arrimage : &lt;/strong&gt;";
        html += "&lt;input type='checkbox' id='point_arrim' name='point_arrim' /&gt;";
        html += "&lt;/p&gt;";
  
        html += "&lt;input type='hidden' id='formatted_address' name='formatted_address' value='"+results[0]['formatted_address']+"' /&gt;";
        html += "&lt;input type='hidden' id='geoloc_lat' name='geoloc_lat' value='"+event.latLng.nb+"' /&gt;";
        html += "&lt;input type='hidden' id='geoloc_long' name='geoloc_long' value='"+event.latLng.ob+"' /&gt;";
        html += '&lt;input type="button" onclick="saveData()" class="info_button" value="Ajouter l\'emplacement"/&gt;'
        html += "&lt;/div&gt;";
  
  
        var infowindow = new google.maps.InfoWindow({
          map: map,
          content : html
        });
        infowindow.open(map, marker);
  
        google.maps.event.addListener(infowindow, 'domready', function(){
          console.log("test");
          console.log($(this));
        });
      }
    });
  });
  
  function saveData() {
    var nb_place = escape(document.getElementById("nb_place").value);
    var point_arrim = escape(document.getElementById("point_arrim").checked);
    var formatted_address = document.getElementById("formatted_address").value;
    var geoloc_lat = document.getElementById("geoloc_lat").value;
    var geoloc_long = document.getElementById("geoloc_long").value;
  
    if(!nb_place) nb_place = null;
  
    var url = "phpsqlinfo_addrow.php?nb_place=" + nb_place + "&amp;point_arrim=" + point_arrim +
      "&amp;formatted_address=" + formatted_address + "&amp;geoloc_lat=" + geoloc_lat + "&amp;geoloc_long=" + geoloc_long;
    downloadUrl(url, function(data, responseCode) {
      if (responseCode == 200 &amp;&amp; data.length &lt;= 1) {
        infowindow.close();
        document.getElementById("message").innerHTML = "Location added.";
      }
    });
  }
  </code></pre>
  
  <p>In fact, I want to dynamically trigger the values related to the clicked infowindow button. 
  I looked at the 'domready' action but can't figure it out.</p>