title: How to prevent google app script reloading/redirecting my webpage after form data submission ..?
body: <p>I am using google app script to submit form data to my email. It's a webpage contact form. But by default after hitting the submit button it takes to a different page and shows a &quot;result:success&quot; weird kinda message. I want to prevent that reload or redirect. How can I do that?</p>
  <p>HTML</p>
  <pre><code>&lt;form id=&quot;email-form&quot; class=&quot;gform&quot; action=&quot;https://script.google.com/macros/s/AKfyJu890G2t-RuhJxTNIA/exec&quot; method=&quot;post&quot;&gt;
          &lt;div class=&quot;email-name&quot;&gt;
              
              &lt;input id=&quot;name&quot; name=&quot;name&quot; type=&quot;text&quot; class=&quot;form-control&quot; placeholder=&quot;write name&quot; autocomplete=&quot;off&quot;&gt;
          &lt;/div&gt;
          &lt;div class=&quot;email-main&quot;&gt;
              
              &lt;input id=&quot;email&quot; name=&quot;email&quot; type=&quot;text&quot; class=&quot;form-control&quot; placeholder=&quot;write email&quot; autocomplete=&quot;off&quot;&gt;
          &lt;/div&gt;
          &lt;div class=&quot;email-subject&quot;&gt;
              
              &lt;input id=&quot;subject&quot; name=&quot;subject&quot; type=&quot;text&quot; class=&quot;form-control&quot; placeholder=&quot;write related sub&quot; autocomplete=&quot;off&quot;&gt;
          &lt;/div&gt;
          &lt;div class=&quot;email-message&quot;&gt;
              
              &lt;textarea id=&quot;message&quot; name=&quot;message&quot; class=&quot;form-control&quot; placeholder=&quot;write message here&quot;&gt;&lt;/textarea&gt;
          &lt;/div&gt;
  
          &lt;button id=&quot;send-email&quot; type=&quot;submit&quot;&gt;SUBMIT EMAIL&lt;/button&gt;
  
          
      &lt;/form&gt;
  </code></pre>
  <p>I can add an alert using onclick event but still the reload happens. Please provide javascript code for preventing the default behavior for this form.</p>