Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript AJAX Basics Programming AJAX Processing JSON Data

Mark Weber
Mark Weber
8,009 Points

Workspace is not updating the page with the javascript XMLHTTPRequest object.

I'm using the finished/js/widget.js file that was supplied and clicking on the preview button in workspaces to view that page but there is nothing in the Employee list on the web page. Nothing is showing up in the Chrome browser console either.

1 Answer

Daven Hietala
Daven Hietala
8,040 Points

I have been battling with this one for a few days. Take out the "finished". Use "<script src="js/widget.js"></script> to link to the proper file in your HTML. And/or if your talking about the xhr.open, then use xhr.open('GET', 'data/employees.json');. I don't know what the purpose of the finished files are. But they are not the the one's to use.

Cheers