JavaScript AJAX Basics (retiring) Programming AJAX Parsing JSON Data

Theresa Kwak
Theresa Kwak
Front End Web Development Techdegree Student 211 Points

Workspace Doesn't Work for Any of the videos

I've been trying to do this AJAX tutorial, but my Workspace does not work. It opens up and I can input the code, but when I try to run it, there's no change added. For this video, when I check my javascript console, the office object does not show up. I'm not sure what the problem is. I tried multiple browsers, I'm not on the finished folder, I didn't make any mistakes (i checked a million times and even copied and pasted), but still it doesn't work.

Is there any way I can do this tutorial without using Workspace? Can I use something else?

3 Answers

Brian Jensen
Brian Jensen
Front End Web Development Techdegree Graduate 44,036 Points

So if I understand you correctly, you can launch the workspace and interact with it? It's just that when you hit the eye icon it doesn't do anything, is that correct? If so, when inside of the workspace click on file and then download the workspace. Then work on the files offline.

I don't know any workspace specific troubleshooting though.

Ozgur Parlakkilic
Ozgur Parlakkilic
8,399 Points

dang dude you got like 23k points wow, you must be a GURU

Same for me as well. I can run the code and do everything but the console is not logging the employee data.

const xhr = new XMLHttpRequest();
xhr.readstatechange = () => {
  if (xhr.readyState === 4) {
    console.log(xhr.responseText);
  }
};
xhr.open('GET','data/employees.json');
xhr.send();

This code doesn't do anything other than log the actual "XHR finished loading: GET"

Ozgur Parlakkilic
Ozgur Parlakkilic
8,399 Points

i bet you messed up adding the script part. Does you HTML script tag look like this :

<script src="js/widget.js"></script>

??