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 trialPitrov Secondary
5,121 PointsI don't understand what is happening
I thought that I was done so I previewed the code. Only the rooms feature was working, the employees, thing didn't work anymore, then I figured that I forgot: if (AJAX.readyState == 4 && AJAX.status === 200){}. When I added that in the code only the employees thing was working not the rooms. can someone tell me why this is happening? here is a snapshot of what I have, I am working on widget.js, and the JSON is rooms.js. thanks
Pitrov Secondary
5,121 Pointssteven, lol ops here it is https://w.trhou.se/y4jdkxssai
1 Answer
Steven Parker
231,269 PointsIn "widget.js" on line 39 you have "employeeList" instead of "roomList". This causes the request that completes first to be overwritten by the one that comes in last.
Pitrov Secondary
5,121 PointsOhhhh, Thank u alot, Steven
Steven Parker
231,269 PointsSteven Parker
231,269 PointsIt doesn't look like your snapshot link got added to your question.