How to set a button to be activated on Enter?

I have a basic code for geocoding.

I use this code for learning.

There is only ONE button on the screen

My Questions:

  1. How can I set focus on this button so it will be activated when I click Enter ?

  2. is it possible to initialize the textbox with the clipboard contents when the hta is loaded ?

  3. Is it possible to simulate a click on the button each time the hta is loaded ?

Here is the code

Many thanks !!!

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Gonen title</title>

<script src=";v=2.x&amp;key=ABQIAAAAkpclZCcw0Dd8N7urilPb8RTwi2g_12bF65p4zEDwX2jt7cD0dhQvH8snORVwA2VqfU-YMqHbC23bgg" type="text/javascript"></script>
<script src="" type="text/javascript"></script>

<script src="" type="text/javascript"></script>
<style type="text/css">  @import url("");  @import url("");</style>

<script type="text/javascript">

    var map;
    var geocoder;

    function load() {
map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(38.134557,-95.800781), 3);
geocoder = new GClientGeocoder();
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.addControl(new GScaleControl()) ;

// bind a search control to the map, suppress result list

    // addAddressToMap() is called when the geocoder returns an
    // answer.  It adds a marker to the map with an open info window
    // showing the nicely formatted version of the address and the country code.
    function addAddressToMap(response) {
      if (!response || response.Status.code != 200) {
        alert("Address cannot be geocoded");
    } else {
        place = response.Placemark[0];
        point = new GLatLng(place.Point.coordinates[1],
        marker = new GMarker(point);

    // place coordinates on clipboard
        var input = String(place.Point.coordinates)

    // will close the window

        marker.openInfoWindowHtml(place.address + '<br />' + '<b>Coordinates:</b> ' + place.Point.coordinates);

    // showLocation() is called when you click on the Search button
    // in the form.  It geocodes the address entered into the form
    // and adds a marker to the map at that location.
    function showLocation() {

    // value from input box
    //  var address = document.forms[0].q.value;

    // value from clipboard
      var address = window.clipboardData.getData ("Text")
      geocoder.getLocations(address, addAddressToMap);

   // findLocation() is used to enter the sample addresses into the form.
    function findLocation(address) {
      document.forms[0].q.value = address;

<script type="text/javascript">
function getposOffset(overlay, offsettype){
var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetTop;
var parentEl=overlay.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
return totaloffset;

function overlay(curobj, subobjstr, opt_position){
if (document.getElementById){
var subobj=document.getElementById(subobjstr)!="block")? "block" : "none"
var xpos=getposOffset(curobj, "left")+((typeof opt_position!="undefined" && opt_position.indexOf("right")!=-1)? -(subobj.offsetWidth-curobj.offsetWidth) : 0)
var ypos=getposOffset(curobj, "top")+((typeof opt_position!="undefined" && opt_position.indexOf("bottom")!=-1)? curobj.offsetHeight : 0)"px""px"
return false
return true

function overlayclose(subobj){


<body onload="load()" onunload="GUnload()">
<br />

<script type="text/javascript"
    <form action="#" onsubmit="showLocation(); return false;" name="geoForm">
<input type="text" name="q" value="" size="0" />
        <input type="submit" name="find" value="Get from Clipboard and Map It" />
      <br /> </form>

    <div id="map" style="width: 100%; height: 480px"></div>
<hr size=1 align=left width=90% color=#000000 style='border: dotted;'>