function showAddress() { geocoder = new google.maps.Geocoder() address=document.getElementById("Church-Search").value+", UK"; geocoder.geocode( { 'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) document.getElementById("Catholic-location").value=results[0].geometry.location; else document.getElementById("Catholic-location").value=''; document.getElementById("Catholic-Church").submit(); }) } // programming (c) CathCom/CatholicDirectory // function runScript(e) { if (e.keyCode == 13) { showAddress(); return false; } }