Question
Overview For this assignment, you will make use of the ChicagoEmployeesQuery class to access Chicago employee information. This class permits a simple search query to
Overview
For this assignment, you will make use of the ChicagoEmployeesQuery class to access Chicago employee information. This class permits a simple search query to an online service. When the search results return to the browser, the class code calls your callbackfunction with an array of results. Your callback function then displays the array contents on the page.
Chicago Public Officials Database
Using the Chicago City Salary page as a starting point, develop an interactive page that does the following given a search string:
- A well formatted display of the matching records including name, position, department and salary.
- An informative message if no records match.
- Some user-specified options for displaying the records.
You do not need to edit the ChicagoEmployees.js file, but you are encouraged to read its comments to understand how to use it.
Not challenging enough? Consider the following:
- A menu that controls which fields will be displayed
- The search word matches on any field including the department and the job title. Allow the user to specify which field must be matched and only display matches for that field.
- Extra challenge: read up on the sort method for arrays. Allow the user to choose the field by which the records will be sorted.
Please provide an email so I can share .js file.
Donloads/salary2/demo.js- (no function selected. # 1 IUse with demo.html 2 /Tested with jQuery 3.1.1, January 2017 3 /Updated January 2818 5 / This function is called when the response has returned postResult function( list) var nameList, i; if (ist.length > ) 18 $("#result") .html(list [e].name + "" + list [8].salary); 12 13 14 | 15 16 17 nameList"; fori ; i"; $( "#names") . html (nameList) ; 19 28 submit function) 21 var searchWord docunent.getElementById("key-word").vaLue; query new ChicagoEnployeesQueryl searchWord); $("#result"), html ("waiting. . ,'') ; query.getList postResult); 23 24 25 26 27 28 29 30 31 32 $(function() { $("#start"), click( submit); }); L: 1 C1 JavaScript. Unicode(UTF-8) , windows (CRLF- af Saved:1/28/19, 10:39:40 AM D 718/ 77/ 32 100% Donloads/salary2/demo.js- (no function selected. # 1 IUse with demo.html 2 /Tested with jQuery 3.1.1, January 2017 3 /Updated January 2818 5 / This function is called when the response has returned postResult function( list) var nameList, i; if (ist.length > ) 18 $("#result") .html(list [e].name + "
" + list [8].salary); 12 13 14 | 15 16 17 nameList"; fori ; i"; $( "#names") . html (nameList) ; 19 28 submit function) 21 var searchWord docunent.getElementById("key-word").vaLue; query new ChicagoEnployeesQueryl searchWord); $("#result"), html ("waiting. . ,'') ; query.getList postResult); 23 24 25 26 27 28 29 30 31 32 $(function() { $("#start"), click( submit); }); L: 1 C1 JavaScript. Unicode(UTF-8) , windows (CRLF- af Saved:1/28/19, 10:39:40 AM D 718/ 77/ 32 100%
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started