Question: Using the following code and AJAX call, how would you add functionality so user can enter course prefix and results will update? // ---------- AJAX

Using the following code and AJAX call, how would you add functionality so user can enter course prefix and results will update?

// ---------- AJAX CALL ----------

var req = new XMLHttpRequest(); // create an ajax request

var url = 'https://api.svsu.edu/courses;

var jsonObj;

req.onreadystatechange = function() {

var readyStateDone = 4;

var readyStatusSuccess = 200;

if (this.readyState == readyStateDone &&

this.status == readyStatusSuccess) {

jsonObj = JSON.parse(this.responseText);

}

};

{{course.prefix}} {{course.courseNumber}}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!