Displaying Directory Information

Web content providers can display information about personnel from the University's Employee Directory on their web pages with just a small amount of JavaScript coding. Follow the examples below to place Directory information on your pages.

Displaying a Single Employee

To display a single employee, create a Contact Card, and write it out to the page.

var meneghincContactCard = new ContactCard({
	NetID: "piercema"
});
meneghincContactCard.write();

Output:

Displaying Several Employees

To display several employees, create an Employee Directory, and write it out to the page. An Employee Directory can have an optional label, but it's not required.

var webServicesDirectory = new EmployeeDirectoryApp({
	label: "Web Services",
	users: ["piercema", "thelinal"],
	preferredDepartment: 53001
});
webServicesDirectory.write();

Output:

Preferring a Department

By preferring one department over others, you can choose which job assignment populates the employee's contact information and title. This is important if you have people working in your department who also work in other departments.

You can use this option with either EmployeeDirectoryApp or ContactCard.

If you leave this blank, the system will display the employee's primary job assignment, if available.

(new ContactCard({
	NetID: "ohallorank",
	preferredDepartment: 19000
})).write();

(new ContactCard({
	NetID: "ohallorank",
	preferredDepartment: 19010
})).write();

Output:

Department ID Numbers

Name ID