Javascript Equating Varaible .value
<p>This is the code im working from: <a href="http://jsfiddle.net/9B84H/26/" rel="nofollow">http://jsfiddle.net/9B84H/26/</a></p>

<pre><code>function autosuggest() {
var input = document.getElementById('location');
    var options = {types: [],};
    var autocomplete = new google.maps.places.Autocomplete(input, options);
}

function getLatLng() {
    var geocoder = new google.maps.Geocoder();
    var address = document.getElementById('location').value;
    geocoder.geocode({
        'address': address
    }, function (results, status) {
        if (status === google.maps.GeocoderStatus.OK) {
            $('#lat').val(results[0].geometry.location.lat());
            $('#lng').val(results[0].geometry.location.lng());
        } else {
            alert("Geocode failed: " + status);
        }
    });
}
</code></pre>

<p>There are two variables which ar pretty much the same​:</p>

<pre><code>var address = document.getElementById('location').value;
var input = document.getElementById('location');
</code></pre>

<p>Is there any opportunity to combine this into one line as a global variable?</p>
