title: Goole App Script HTML Onclick Button Issue
body: <p>I am working on a sidebar menu, and so far, I got it working to load values from a sheet.  I am working on getting the sidebar to update the value that is selected and currently struggling a little bit since I can't seem to catch an error and struggling a bit to figure out how to error handle app scripts and HTML in app scripts.  So the first ask here is can someone point me to a reference on how to error handle issues with HTML and Apps script.</p>
  <p>My second issue my current problem, I have an HTML button that is calling <code>onFormUpdate()</code> function which is located inside a seperate HTML file just for handling javascript functions.  Here is my index.html</p>
  <pre class="lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;base target=&quot;_top&quot;&gt;
    &lt;?!= include('sidebar/sidebarcss'); ?&gt;
  
    &lt;body&gt;
      &lt;div id=&quot;title&quot;&gt; 
        &lt;div&gt;&lt;h2&gt;Meeting Item&lt;/h2&gt;&lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div id=&quot;meet&quot;&gt;
        &lt;form id=&quot;meetform&quot;&gt;
          Row ID: &lt;br&gt;
          &lt;input type=&quot;text&quot; id=&quot;meetrowId&quot; name=&quot;meetrowId&quot; maxlength=&quot;4&quot; size=&quot;4&quot; readonly /&gt;
          Meet ID: &lt;br&gt;
          &lt;input type=&quot;text&quot; id=&quot;meetId&quot; name=&quot;meetId&quot; maxlength=&quot;8&quot; size=&quot;10&quot; readonly /&gt;
          Enter Date: &lt;br&gt;
          &lt;input type=&quot;text&quot; id=&quot;meetingDate&quot; name=&quot;meetingDate&quot;/&gt;
          Topic: &lt;br&gt;
          &lt;input type=&quot;text&quot; id=&quot;meetTopic&quot; name=&quot;meetTopic&quot;/&gt;
          Agenda: &lt;br&gt;
          &lt;textarea name=&quot;meetAgenda&quot; id=&quot;meetAgenda&quot; rows=&quot;10&quot; cols=&quot;30&quot;&gt;&lt;/textarea&gt;
          Comment History:&lt;br&gt;
          &lt;textarea name=&quot;meetComments&quot; id=&quot;meetComments&quot; rows=&quot;10&quot; cols=&quot;30&quot; readonly &gt;&lt;/textarea&gt;
          Add Comments:&lt;br&gt;
          &lt;textarea name=&quot;meetComUpdate&quot; id=&quot;meetComUpdate&quot; rows=&quot;10&quot; cols=&quot;30&quot;&gt;&lt;/textarea&gt;&lt;br&gt;
  
           &lt;input type=&quot;button&quot; class=&quot;button&quot; value=&quot;Update Record&quot; onclick=&quot;onFormUpdate()&quot;/&gt;
  
        &lt;/form&gt;
      &lt;/div&gt;
      &lt;input type=&quot;button&quot; class=&quot;button&quot; value=&quot;Select Another ID&quot; onclick=&quot;google.script.run.showEmailSidebar()&quot;/&gt;
      &lt;input type=&quot;button&quot; class=&quot;button&quot; value=&quot;Close&quot; onclick=&quot;google.script.host.close()&quot;/&gt;
      
      &lt;?!= include('sidebar/script'); ?&gt; 
      &lt;script&gt;
        google.script.run.withSuccessHandler(onSuccess).SidebarActiveRow();
      &lt;/script&gt;
  
    &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  <p>Within the form i call my onFormUpdate() and nothing happens when I click the button. As you can see i include 'sidebar/script' which is my html file that stores all javascript functions.  OnFormUpdate() is located within the 'sidebar/script' and is shown below:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;script&gt;
   
    function onSuccess([cellrow, meetid, meetdate, meettopic, meetagenda, meetcomments]) 
    {
  
      /*
      Secondary method for string parsing
      const table =sidebarVar.split(&quot;,&quot;) //[&quot;key:value&quot;,&quot;key:value&quot;]
       .map(pair =&gt; pair.split(&quot;:&quot;)); //[[&quot;key&quot;,&quot;value&quot;],[&quot;key&quot;,&quot;value&quot;]]
  
      const result = Object.fromEntries(table);
      result.meetid;
      */
      
      document.getElementById('meetrowId').value = cellrow
      document.getElementById('meetId').value = meetid
      document.getElementById('meetingDate').value = meetdate
      document.getElementById('meetTopic').value = meettopic
      document.getElementById('meetAgenda').value = meetagenda;
      document.getElementById('meetComments').value = meetcomments;
  
  
    }
  
  
    function onFormUpdate()
    {
  
      var recordform = 
      {
          row: document.getElementById('meetrowId').value,
          topic: document.getElementById('meetTopic').value,
          agenda: document.getElementById('meetAgenda').value,
          newcomment: document.getElementById('meetComUpdate').value
      };
  
      google.script.run.withSuccessHandler(SidebarActiveRow).recordUpdate(recordform);
      
  
  
    }
  
  
  
  &lt;/script&gt;
  </code></pre>
  <p>As you can see I am trying to get the app handler to call <code>SidebarActiveRow</code> which is leverage with my <code>onSuccess</code> function to load data elements from the sheet; this works fine.   The handler is calling <code>SidebarActiveRow</code> to run after i successfully run <code>recordUpdate()</code> which is located in my code.gs file.  So far nothing is happening.  I have this current code for testing to see if the function works but no success.</p>
  <pre><code>function recordUpdate(recordform) {
  
      SpreadsheetApp.getUi().alert(recordform.row);
  
  }
  </code></pre>
  <p>I get no prompts which I can't seem to troubleshoot since the html and Apps Script function don't really show an errors.  I did go to executions to see if there were any errors and i don't see any at this time.  So i am looking for some help here.</p>