Reputation: 787
I have a form that I have implemented using HtmlService. When I submit it I want to see different Html page instead of the page with the form on it. Basically this new page should replace the form page. How do I go about doing this. I tried to create a template form from the process form function that gets called when the form is submitted. But it didn't work. Help me out with this please.
Upvotes: 3
Views: 3116
Reputation: 45720
See this answer for an example of serving multiple html pages using HtmlService. The basic idea is to write doGet()
to accept a query parameter that it will use to select which html page to serve.
Upvotes: 1
Reputation: 13941
I am not aware of any server-side redirect mechanism (that you could use in the template, that is). However, one way how to do it is via Ajax, client-side. See, for example, how I did it in VALET (open index.html and look from line 240 on).
As an aside: I also tried reloading a page which seemed not to work (maybe due to the restrictions re the window
and document
object.
Upvotes: 0