-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
49 lines (45 loc) · 1.48 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<html>
<head>
<meta name="viewport" content="initial-scale=1">
<title>Folio - Web solutions for book publishers</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<link href='style.css' rel='stylesheet'>
</head>
<body>
<div id="container">
<h1>Folio</h1>
<h2>Web solutions for book publishers. Contact us at <a id="info-email" href='mailto:info@folio.pub'>info@folio.pub</a></h2>
<div id="notification-form">
<p>Or sign up to receive updates:</p>
<input class='text' id='email' name='email' type='email' placeholder="Email">
<button class='contact-form' id='send' onclick='postToGoogleDrive()' value='Send'>Notify me</button>
<div id='success-msg'></div>
</div>
</div>
<script>
function postToGoogleDrive() {
console.log("hello");
console.log($('#email').val());
var email = $('#email').val();
var googleDrive = "https://docs.google.com/forms/d/e/1FAIpQLSeAjMmPTpPSAP6DaKluHw-Rei6Ch19UoEbnMvWONxiJngDeJQ/formResponse";
$.ajax({
url: googleDrive,
data: {
"entry.1229852547": email
},
type: "POST",
dataType: "xml",
statusCode: {
0: function () {
$('#success-msg').html("Thanks!");
clear();
}
}
});
}
function clear() {
$('#email').val('');
}
</script>
</body>
</html>