title: Sending "this" radio button element parameter to function in Google Apps script
body: <p>I have a custom sidebar generated via Apps Script on a Google Sheet.</p>
  <p>The custom sidebar html contains a form and fieldset with 5 radio input elements, all with onchange events:</p>
  <pre><code>google.script.run.viewOptionsFormRadioChange(this);
  </code></pre>
  <p>Here's the full form HTML:</p>
  <pre><code>&lt;form id=&quot;viewOptionsForm&quot;&gt;
        &lt;fieldset class=&quot;viewOptionsFieldset&quot;&gt;
          &lt;input type=&quot;radio&quot; id=&quot;all&quot; name=&quot;viewOptionsRadio&quot; value=&quot;All&quot;  checked=&quot;checked&quot; onchange='google.script.run.viewOptionsFormRadioChange(this);' &gt;
          &lt;label for=&quot;all&quot;&gt;All&lt;/label&gt;&lt;br&gt;
          &lt;input type=&quot;radio&quot; id=&quot;firstImport&quot; name=&quot;viewOptionsRadio&quot; value=&quot;First Import&quot; onchange='google.script.run.viewOptionsFormRadioChange(this);'&gt;
          &lt;label for=&quot;firstImport&quot;&gt;First Import&lt;/label&gt;&lt;br&gt;
          &lt;input type=&quot;radio&quot; id=&quot;secondImport&quot; name=&quot;viewOptionsRadio&quot; value=&quot;Second Import&quot; onchange='google.script.run.viewOptionsFormRadioChange(this);'&gt;
          &lt;label for=&quot;secondImport&quot;&gt;Second Import&lt;/label&gt;&lt;br&gt;
          &lt;input type=&quot;radio&quot; id=&quot;compositionLinking&quot; name=&quot;viewOptionsRadio&quot; value=&quot;Composition Linking&quot; onchange='google.script.run.viewOptionsFormRadioChange(this);'&gt;
          &lt;label for=&quot;compositionLinking&quot;&gt;Composition Linking&lt;/label&gt;&lt;br&gt;
          &lt;input type=&quot;radio&quot; id=&quot;underTheHood&quot; name=&quot;viewOptionsRadio&quot; value=&quot;Under the Hood&quot; onchange='google.script.run.viewOptionsFormRadioChange(this);'&gt;
          &lt;label for=&quot;underTheHood&quot;&gt;Under the Hood&lt;/label&gt;
        &lt;/fieldset&gt;
      &lt;/form&gt;
  </code></pre>
  <p>I then have a function &quot;viewOptionsFormRadioChange&quot;:</p>
  <pre><code>function viewOptionsFormRadioChange(checkbox) {
  
      if(checkbox.checked == true){
        if(checkbox.attr('id') == &quot;underTheHood&quot;) {
          SpreadsheetApp.getActive().toast(&quot;underTheHood Selected&quot;, &quot;Title&quot;, 15);
        }
      }
  }
  </code></pre>
  <p>I'm trying to get it so the toast notification appears when I select the Under the Hood radio button, however the &quot;this&quot; element parameter doesn't appear to be coming through as parameter variable: checkbox since the above doesn't work.</p>
  <p>Any ideas where I'm going wrong?</p>
  <p>Thanks either way</p>