title: issue on javascript Variables
body: <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta name="viewport" content="initial-scale=1.0, user-scalable=no"&gt;
          &lt;meta charset="utf-8"&gt;
          &lt;title&gt;Geocoding service&lt;/title&gt;
          &lt;script src="https://maps.googleapis.com/maps/api/js?v=3.exp&amp;sensor=false"&gt;&lt;/script&gt;
          &lt;script&gt;
              function initialize() {
  
                  geocoder = new google.maps.Geocoder();
  
                  address = "toronto, canada";
  
                  geocoder.geocode({
                      'address': address
                  }, function (results, status) {
                      if (status == google.maps.GeocoderStatus.OK) {
                          var lat = results[0].geometry.location.lat();
                          var lng = results[0].geometry.location.lng();
                      } else {
                          var lat = 123;
                          var lng = 456;
                      }
                      document.getElementById('my_place1').value = lat + " - " + lng;
                  });
  
                  document.getElementById('my_place').value = lat + " - " + lng;
  
              }
          &lt;/script&gt;
      &lt;/head&gt;
  
      &lt;body onLoad="initialize()"&gt;
          &lt;input name="" id="my_place" style="width:300px; margin-left:20px;" type="text"&gt;
          &lt;br&gt;
          &lt;input name="" id="my_place1" style="width:300px; margin-left:20px;" type="text"&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>In the above code for <code>my_place1</code> value is working but the same value not working with my_place. Can anybody help to solve this issue? I want to work something outside <code>geocoder.geocode</code> with <code>lat</code> and <code>lng</code> values.</p>