-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpost.js
40 lines (36 loc) · 962 Bytes
/
post.js
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
/*
*
* post.js
*
* functions to make POST requests to specific urls
*/
function addCal()
{
var newName = document.newCal.calName.value;
$.post("http://www.hcs.harvard.edu/projectx/hidden/addCal.php", {calName: newName} );
document.newCal.calName.value = "";
}
function addEvent()
{
var newName = document.newEvent.name.value;
var newDate = document.newEvent.date.value;
var newLoc = document.newEvent.location.value;
var newTime = document.newEvent.time.value;
var newBlurb = document.newEvent.blurb.value;
// var newCal = document.
$.post("hidden/addEvent.php",
{
name: newName,
date: newDate,
location: newLoc,
time: newTime,
blurb: newBlurb,
// cal: newCal
});
document.newEvent.name.value = "";
document.newEvent.date.value = "";
document.newEvent.location.value = "";
document.newEvent.time.value = "";
document.newEvent.blurb.value = "";
// document.
}