title: How to insert latitude & longitude to form automatically when the marker clicked
body: <p>I make map with google api v3. I make form inside info window, it appears when the marker clicked. Here is map.html</p>
  
  <pre><code>&lt;!DOCTYPE html &gt;
    &lt;head&gt;
      &lt;meta name="viewport" content="initial-scale=1.0, user-scalable=no" /&gt;
      &lt;meta http-equiv="content-type" content="text/html; charset=UTF-8"/&gt;
      &lt;title&gt;Google Maps JavaScript API v3 Example: Map Simple&lt;/title&gt;
      &lt;script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
      var marker;
      var infowindow;
  
      function initialize() {
        var latlng = new google.maps.LatLng(-6.9667, 110.41677);
        var options = {
      zoom: 13,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
        }
        var map = new google.maps.Map(document.getElementById("map-canvas"), options);
        var html = "&lt;form action='save.php' method='post'&gt;" +
           "Title: &lt;input type='text' name='title' id='title'/&gt;&lt;/br&gt;" +
           "Latitude: &lt;input type='text' name='latitude' id='latitude'/&gt;&lt;/br&gt;" +
           "Longitude: &lt;input type='text' name='longitude' id='longitude'/&gt;&lt;/br&gt;" +
           "Description: &lt;input type='text' name='description' id='description'/&gt;&lt;/br&gt;" +
           "Category: &lt;input type='text' name='category' id='category'/&gt;&lt;/br&gt;" +
               "&lt;input type='submit' id='submit' value='Submit' /&gt;&lt;/br&gt;" +
          "&lt;/form&gt;";
      infowindow = new google.maps.InfoWindow({
       content: html
      });
  
      google.maps.event.addListener(map, "click", function(event) {
      marker = new google.maps.Marker({
        position: event.latLng,
        map: map
      });
      google.maps.event.addListener(marker, "click", function() {
        infowindow.open(map, marker);
      });
      });
      }
      &lt;/script&gt;
    &lt;/head&gt;
  
    &lt;body style="margin:0px; padding:0px;" onload="initialize()"&gt;
      &lt;div id="map-canvas" style="width: 500px; height: 300px"&gt;&lt;/div&gt;
    &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>What I want is when the marker clicked, latitude &amp; longitude forms are automatically filled, like this picture
  <img src="https://i.stack.imgur.com/DZgsE.jpg" alt="enter image description here"></p>
  
  <p>Anyone can help me? Thank you for any help</p>