title: Script Conflict Onchange and table row selection
body: <p>So the script is to allow me to click the row in the table and set the input value in the form whatever the data of the selected row. However, this script is not working when I incorporate the solution for the onchange. I was thinking if there's conflict on the scripts? This is just a follow-up on this query: 
  <a href="https://stackoverflow.com/questions/58401070/onchange-in-google-script-to-change-table-data/58410721?noredirect=1">Onchange in Google script to change table data</a></p>
  
  <p>Here's the current code I am trying to figure out.</p>
  
  <blockquote>
    <p>code.gs</p>
  </blockquote>
  
  <pre><code>function doGet() {
    var html=HtmlService.createTemplateFromFile('index');
    return html.evaluate();
  }
  
  function getSelect() {
    var list = SpreadsheetApp.openById('spreadssheetID').getSheetByName("VL Slots").getDataRange().getValues();
    var lane = 1;
    var select="";
    for (var l = 3; l &lt; list.length; l++) {
      select+='&lt;option value="' + list[l][lane] + '"&gt;'+ list[l][lane] + ' &lt;/option&gt;';
    }
    return select;
  }
  
  function getTable(lob) {
    var data = SpreadsheetApp.openById('spreadssheetID').getSheetByName("VL Request").getDataRange().getValues();
    var rid = 0;
    var request = 1;
    var table="";
    table+='&lt;tr&gt;';
    for (var i = 1; i &lt; data.length; i++) { 
      if (data[i][rid] == lob) {
        table+='&lt;td&gt;' + data[i][request] + '&lt;/td&gt;';
      }
    }
    table+='&lt;/tr&gt;';
    return  table;
  }
  </code></pre>
  
  <blockquote>
    <p>index.html</p>
  </blockquote>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;base target="_top"&gt;
    &lt;/head&gt;
    &lt;script&gt;
      function populateSelect() {
        google.script.run.withSuccessHandler(onSuccess).getSelect();
      }
      function onSuccess(select) {
        document.getElementById("mySelect").innerHTML=select;
      }
      function polling() {
        setInterval(myFunction, 2000);
      }
      function myFunction() {
        var lob = document.getElementById("mySelect").value;
        google.script.run.withSuccessHandler(onSuccess2).getTable(lob);    
      }
      function onSuccess2(table) {
        document.getElementById("myTable").innerHTML=table;
      }
    &lt;/script&gt;
    &lt;body onload="populateSelect()"&gt;
      &lt;select id="mySelect" onchange="polling()"&gt;&lt;/select&gt;
      &lt;table id="myTable"&gt; &lt;/table&gt;
      &lt;form id="logForm"&gt;
        &lt;label&gt;Request &lt;span class="required"&gt;*&lt;/span&gt;&lt;/label&gt;
        &lt;input type="text" id="request" name="request" class="field-long" placeholder="Request" readonly /&gt; 
      &lt;/form&gt;
  
      &lt;script&gt;    
        var table = document.getElementById('myTable');    
        for(var i = 1; i &lt; table.rows.length; i++) {
          table.rows[i].onclick = function() {
            //rIndex = this.rowIndex;
            document.getElementById("request").value = this.cells[0].innerHTML.trim();    
          };
        }    
      &lt;/script&gt;    
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>