Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8855167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:04:19+00:00 2026-06-14T14:04:19+00:00

I have a form in a html file inside my google apps script project,

  • 0

I have a form in a html file inside my google apps script project, I need to redirect to another html file when a submit button is Clicked.

HTML CODE:

 <html>
      <script>
        function doSomething(){
          alert('this one works too!'); 
          //here Change of page
        }
      </script>

     <body>
        <h1 style="text-align:center;font-family:Tahoma;">HORAS LABORADAS<br/>    
        <form style="margin-left:90px;font-family:Trebuchet MS;">
          <b>Nombre</b><br/>
          <input type="button" onclick="doSomething()">
        </form>
      </body>
 </html>

I call this by

function doGet() {
  return HtmlService.createTemplateFromFile('prueba').evaluate();
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T14:04:20+00:00Added an answer on June 14, 2026 at 2:04 pm

    HTML FILE1

          <html>
              <body>
                <h1 style="text-align:center;font-family:Tahoma;">HORAS LABORADAS<br/>    
                <form style="margin-left:90px;font-family:Trebuchet MS;">
                  <b>Nombre</b><br/>
                  <?var url = getUrl();?><a href='<?=url?>?page=2'><input type='button' name='test' value='GO TO PAGE 2'></a>
                </form>
              </body>
         </html>
    

    HTML FILE2

    <html>
      <h1>This is Page 2.</h1><br/>
     <?var url = getUrl();?><a href='<?=url?>?page=1'>  <input type='button' name='test' value='RETURN TO PAGE 1'></a>
    </html>
    

    CODE.GS

    function getUrl(){
      var url = ScriptApp.getService().getUrl();
      return url;
    }
    
     function doGet(requestInfo) {
          var url = ScriptApp.getService().getUrl();
          if (requestInfo.parameter && requestInfo.parameter['page'] == '2') {
            return HtmlService.createTemplateFromFile('FILE2').evaluate();
          }
          return HtmlService.createTemplateFromFile('FILE1').evaluate();
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have html form i am using <a href="#" onclick="document.aa.submit()"> instead of submit button
I have a asp.net form with 5 HTML file input controls with runat=server and
I have a following problem, I have HTML form that uploads a file with
I have a html form for uploading a file, which is as follows: $uploadhtml
I have a html file like following: <form action=/2811457/follow?gsid=3_5bce9b871484d3af90c89f37 method=post> <div> <a href=/2811457/follow?page=2&amp;gsid=3_5bce9b871484d3af90c89f37>next_page</a> &nbsp;<input
I have a Html form. I want to get the file containing posted form's
We have got an extjs 3.1.1 form with file upload field ( http://www.extjs.com/deploy/dev/examples/form/file-upload.html from
I have a PHP validate statement for a file upload on a HTML form.
I have this HTML: <form action='uploadhandle.php' method='POST' enctype=multipart/form-data> <input type='file' class='fileinput' id='photo1' name='photo1'> <input
I have a form in html which runs a php script whitch inserts text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.