title: Code executes automatic and not on button click
body: <p>I modified a piece of code and HTML from Khizer Mehmood. Great piece of coding, will include link. It does almost all I need. But it triggers a Geolocation directly, I want to add information to one more column and then send this in to Sheets.</p>
  <p>I dont know how to modify this HTML and code so that it will prompt me to add information before sending it all to Google Sheets</p>
  <p>Here's my code:</p>
  <h3>JavaScript:</h3>
  <pre class="lang-js prettyprint-override"><code>function doGet() {
      return HtmlService.createHtmlOutputFromFile('Index');
  }
  
  function getLoc(value) {
      var SpreadSheetKey = &quot;1NDDhHomd4uJ8Xc2OlmK_jtShCKRLuHrwMBieURtM8zo&quot;;
      var ss = SpreadsheetApp.openById(SpreadSheetKey);
      var respSheet = ss.getSheets()[0];
      var data = respSheet.getDataRange().getValues();
      var headers = data[0];
      //var numColumns = headers.length ;
      var numResponses = data.length;
      var c = value[0];
      var d = value[1];
      var e = c + &quot;,&quot; + d; {
          respSheet.getRange(numResponses + 1, 1).setValue(Utilities.formatDate(new Date(), &quot;GMT+2&quot;, &quot;MM/dd/yyyy HH:mm:ss&quot;));
          respSheet.getRange(numResponses + 1, 2).setValue(e);
          var response = Maps.newGeocoder().reverseGeocode(value[0], value[1]);
          f = response.results[0].formatted_address;
          respSheet.getRange(numResponses + 1, 3).setValue(f);
  
      }
  }
  </code></pre>
  <h3>HTML:</h3>
  <pre class="lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
     &lt;script&gt;
        (function getLocation() {
          if (navigator.geolocation) {
              navigator.geolocation.getCurrentPosition(showPosition);
          }
        })()
        function showPosition(position) {
         var a= position.coords.latitude;
         var b= position.coords.longitude;
         var c=[a,b]
         getPos(c)
         function getPos(value) {
         google.script.run.getLoc(value);
         }
        }
     &lt;/script&gt;
     &lt;button onclick=&quot;myFeed&quot;&gt;Copy Text&lt;/button&gt;
     &lt;body&gt;
        &lt;h2&gt;Thank you!&lt;/h2&gt;
        &lt;p&gt; Your registration is complete. Have a great day! &lt;/p&gt;
        &lt;img src=&quot;https://drive.google.com/thumbnail?id=1wheniE0HFtA37frkolHfmnjRLFbNkTI3&quot; alt=&quot;W3Schools.com&quot; style=&quot;width:100px;height:120px;&quot;&gt;
     &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>