-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
33 lines (24 loc) · 773 Bytes
/
script.js
File metadata and controls
33 lines (24 loc) · 773 Bytes
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
function sendMessage () {
let contactEmail = $("#exampleFormControlInput1").val();
let contactMessage = $("#exampleFormControlTextarea1").val();
console.log(contactEmail);
console.log(contactMessage);
// Changing the page html to say "Thank You! Message Received."
$("#page1").html("<h1>Thank you! Message Received.</h1>")
}
// I used this function to create a db entry from a form body
/* create: function(req, res) {
console.log(req.body);
db.Event.create(req.body)
.then(dbEvent => res.json(dbEvent))
.catch(err => res.status(422).json(err));
},
*/
// Using ajax
/*
var query url = www.obdmi.com;
$.ajax({
url: queryURL,
method: "GET"
}).then(function(response) {
*/