-
Notifications
You must be signed in to change notification settings - Fork 0
/
reviewjob.js
31 lines (28 loc) · 1.6 KB
/
reviewjob.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
function postJobReview(){
var jobTitle = document.getElementById("jobTitle").value;
var department = document.getElementById("department").value;
var overallRating = document.getElementById("overallRating").value;
var WSoS = document.getElementById("WSoS").value;
var CWrating = document.getElementById("CWrating").value;
var hourlyRate = document.getElementById("hourlyRate").value;
var hoursPerWeek = document.getElementById("hoursPerWeek").value;
var doHW = document.getElementById("doHW").value;
var schedFlex = document.getElementById("schedFlex").value;
var other = document.getElementById("other").value;
document.getElementById("jobTitle").value = "";
document.getElementById("department").value = "";
document.getElementById("overallRating").value = "";
document.getElementById("WSoS").value = "unspecified";
document.getElementById("CWrating").value = "";
document.getElementById("hourlyRate").value = "";
document.getElementById("hoursPerWeek").value = "";
document.getElementById("doHW").value = "unspecified";
document.getElementById("schedFlex").value = "";
document.getElementById("other").value = "";
params = "jobTitle=" + jobTitle + "&department=" + department + "&overallRating=" + overallRating + "&WSoS=" + WSoS + "&CWrating=" + CWrating + "&hourlyRate=" + hourlyRate + "&hoursPerWeek=" + hoursPerWeek + "&doHW=" + doHW + "&schedFlex=" + schedFlex + "&other=" + other;
url = "https://job-os.herokuapp.com/postReview";
request = new XMLHttpRequest();
request.open("POST", url, true);
request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
request.send(params);
}