-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
111 lines (94 loc) · 3.1 KB
/
index.html
File metadata and controls
111 lines (94 loc) · 3.1 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<html>
<head>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<!-- Bootstrap CSS -->
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/js/bootstrap.bundle.min.js"
integrity="sha384-pprn3073KE6tl6bjs2QrFaJGz5/SUsLqktiwsUTF55Jfv3qYSDhgCecCxMW52nD2"
crossorigin="anonymous"></script>
<title>AND Digital ATT</title>
<style>
h1 {
text-align: center;
color: red;
}
p {
text-align: center;
}
div {
text-align: center;
}
.cta-btn {
color: white !important;
background-color: red !important;
}
</style>
</head>
<body>
<div class="container">
<div class="row">
<h1>AND Digital ATT (AND Title Thingy)</h1>
</div>
<br />
<div class="row">
<fieldset>
<form action="/text-user">
<div class="row p-3">
<div class="col-6">
<label for="SenderName">Who are you?</label>
<input id="SenderName" type="text" placeholder="<Insert Name>" class="form-control" />
</div>
<div class="col-6">
<label for="ANDTitle">What's your AND title?</label>
<input id="ANDTitle" type="text" placeholder="AND.." class="form-control" />
</div>
</div>
<div clas="row p-3">
<label for="receiverName">Who are you sending this to?</label>
</div>
<div class="row p-3">
<div class="col-6">
<input id="receiverName" type="text" placeholder="What's their name?" class="form-control" />
</div>
<div class="col-6">
<input id="receiverNum" type="tel" placeholder="What's their phone number?" class="form-control" />
</div>
</div>
</form>
<div class="row p-3">
<div class="col-6">
<button class="btn cta-btn" onclick="sendMessage()">Send</button>
</div>
<div class="col-6">
<button class="btn cta-btn" type="reset">Cancel</button>
</div>
</div>
</fieldset>
</div>
</div>
</body>
<script>
function sendMessage() {
var name = document.getElementById("SenderName").value;
var andTitle = document.getElementById("ANDTitle").value;
var receiverName = document.getElementById("receiverName").value;
var receiverNum = document.getElementById("receiverNum").value;
var message = {
name,
andTitle,
receiverName,
receiverNum,
};
var test = JSON.stringify(message);
const http = new XMLHttpRequest()
http.open('POST', 'http://localhost:3000/text-user')
http.setRequestHeader('Content-type', 'application/json')
http.send(test)
console.log(test);
}
</script>
</html>