We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey,
Im looking to add a redirection after the POST. I tried several different things without any success :(
Script still redirect to the JSON or Google App Script page
Best,
The text was updated successfully, but these errors were encountered:
What worked for me was:
set the Web App access/auth, "Who has access" to Anyone. you can do this in appscript by clicking Deploy, Manage Deployments, edit
then in your html file after closing tag:
<script> window.addEventListener("load", function() { const scriptURL = '<YOUR SCRIPT URL>' const form = document.getElementById('id of your form'); form.addEventListener("submit", function(e) { e.preventDefault(); const data = new FormData(form); fetch(scriptURL, { method: 'POST', body: data, mode: 'no-cors', // unsure if this is needed since access changed to anyone }) .then(() => { window.top.location.href = 'your page url'; }) }); }); </script>
Sorry, something went wrong.
No branches or pull requests
Hey,
Im looking to add a redirection after the POST.
I tried several different things without any success :(
Script still redirect to the JSON or Google App Script page
Best,
The text was updated successfully, but these errors were encountered: