title: How do I redirect to a URL after submitting an HTML form built with Google Scripts?
body: <p>I created a form which uploads form field data to a Google Sheet and uploads a file to Google Drive. Right now, upon submission, the page is redirected to a new page that says "File uploaded successfully to the google drive url." </p>
  
  <p>I want to redirect to a specific URL. How do I do this?</p>
  
  <p>!!UPDATE 7/20!! I have updated the code as recommended by Jonas W below. However, after checking the debugger, the following error is issued:</p>
  
  <p>"Load denied by X-Frame-Options: <a href="https://accounts.google.com/ServiceLogin?service=wise&amp;passive=1209600&amp;continue=https%3A%2F%2Fn-a5ewhrjyamnkpqisqxvdofomdabpix44dfr7wvq-0lu-script.googleusercontent.com%2Fcenterforalternativefuels.org&amp;followup=https%3A%2F%2Fn-a5ewhrjyamnkpqisqxvdofomdabpix44dfr7wvq-0lu-script.googleusercontent.com%2Fcenterforalternativefuels.org" rel="nofollow">https://accounts.google.com/ServiceLogin?service=wise&amp;passive=1209600&amp;continue=https%3A%2F%2Fn-a5ewhrjyamnkpqisqxvdofomdabpix44dfr7wvq-0lu-script.googleusercontent.com%2Fcenterforalternativefuels.org&amp;followup=https%3A%2F%2Fn-a5ewhrjyamnkpqisqxvdofomdabpix44dfr7wvq-0lu-script.googleusercontent.com%2Fcenterforalternativefuels.org</a> does not permit framing."</p>
  
  <p>Any recommendations as to how to work around X-Frame-Options?</p>
  
  <p>Here is the current redirect code at the end of my file upload function:</p>
  
  <pre><code>return "File uploaded successfully" + file.getUrl();
  </code></pre>
  
  <p>The file upload function is called in the form html file:</p>
  
  <pre><code>&lt;input type="submit" value="Submit" 
     onclick="this.value='Uploading..';
              google.script.run.withSuccessHandler(fileUploaded)
              .uploadFiles(this.parentNode);
              return false;" style="margin-top: 20px"&gt;
  </code></pre>
  
  <p>And here is the fileUploaded code from the form html file:</p>
  
  <pre><code>&lt;script&gt;
   function fileUploaded(status){ 
    window.location="http://centerforalternativefuels.org";
   }
  &lt;/script&gt;
  </code></pre>