Redirect doesn't seem to work

357 views
Skip to first unread message

Javier Candeira

unread,
Nov 26, 2021, 8:32:57 AM11/26/21
to Google Apps Script Community
Hello community!
Recently I have connected one of my forms with my google spreadsheet through Apps Script, but whenever the form is submitted it redirects to a script page. I've tried implementing this code:
return HtmlService.createHtmlOutput(
    
    "<script>window.top.location.href=\"" + REDIRECT_URL + "\";</script>"
  ); 
but it doesn't work. Is there any other possible solutions to this issue?
Thanks!!

adroi...@gmail.com

unread,
Nov 26, 2021, 8:59:35 AM11/26/21
to Google Apps Script Community
Something changed within the last 6 months that prevents chrome from redirecting without user action. Most likely, you are going to have to create or unhide a button on success and the button is going to have to run the code above.
Reply all
Reply to author
Forward
0 new messages