Skip to content

Commit 9111ea9

Browse files
committed
🎉 Redirect after submitting Google Form
- ref: https://codenote.net/g-suite/4512.html
1 parent ad9b0f3 commit 9111ea9

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

google-form-redirect/index.html

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<title>Redirect after submitting Google Form</title>
6+
</head>
7+
8+
<body>
9+
<iframe id="my-google-form"
10+
src="https://docs.google.com/forms/d/e/1FAIpQLSeh-Y0pggtUsikRCw-HRIvVDe98rztanA-4Gh8S4GsPDstscw/viewform?embedded=true"
11+
width="640" height="487" frameborder="0" marginheight="0" marginwidth="0"
12+
style="margin:0 auto; max-width:100%;">Loading…</iframe>
13+
14+
<script type="text/javascript">
15+
var load = 0;
16+
document.getElementById('my-google-form').onload = function () {
17+
// Execute on every reload on iFrame
18+
load++;
19+
if (load > 1) {
20+
// Second reload is a submit
21+
document.location = "https://www.google.com/search?q=thanks&tbm=isch";
22+
}
23+
}
24+
</script>
25+
</body>
26+
27+
</html>

0 commit comments

Comments
 (0)