Skip to content

Commit abcf192

Browse files
authored
Merge pull request #1 from codenote-net/feature/redirect-after-submitting-google-form
Redirect after submitting Google Form
2 parents ad9b0f3 + 9111ea9 commit abcf192

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)