-
Notifications
You must be signed in to change notification settings - Fork 13
staff.json
Sean edited this page Oct 9, 2017
·
3 revisions
Each staff member is its own property in an object.
Example:
"Steve Ames":{
"jobTitle":"Instructional Supervisor, Teacher",
"department":"Physical Education",
"phone":"354-8266",
"email":"[email protected]",
"webpage":null
}
If there's no department or webpage, it's null
. If there's no phone or email, it's just an empty string ""
.
JSON was ripped directly off of the Gunn website.
Copy and paste this code into your JavaScript:
var staff,
xmlHttp=new XMLHttpRequest();
function callback() {
// PUT WHATEVER YOU WANT TO DO WITH staff HERE
}
xmlHttp.onreadystatechange=function(){
if (xmlHttp.readyState===4&&xmlHttp.status===200) callback(staff=JSON.parse(xmlHttp.responseText));
};
xmlHttp.open("GET","https://orbiit.github.io/gunn-web-app/json/staff.json",true);
xmlHttp.send(null);