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 trialScott Hetrick
7,725 PointsAJAX Basics Stage 4 project not working?
The "Displaying the Photos" project in video 6 of AJAX Basics Stage 4 does not seem to be working. I followed along with project videos and entered code as instructed into workspace with no success. Loading "finished" project files provided did not work either.
4 Answers
Dave McFarland
Treehouse TeacherHave you checked the JavaScript console in your browser? Are there any error messages? Try loading the index.html file from the stage4-->video6-->finished folder into your browser, click one of the buttons and looking in the console for any errors.
Anthony Cortez
7,593 PointsHi Scott, I was also having trouble after following along, but I caught my mistake. I named a variable flickrAPI instead of flickerAPI. Check if that letter "e" is matching.
Scott Hetrick
7,725 PointsDave, Great suggestion. Should have thought of that myself. I compared the original and "finished" files. I see that in the original the flickrData var is not defined ($.getJSON(flickerAPI, flickrData, displayPhotos);). However, in the "finished" files we have ($.getJSON(flickerAPI, flickrOptions, displayPhotos);) and var flickrOptions is defined.
So loading the finished files directly into the browser works.
However, when I review the work I did in workspaces, the code is correct ($.getJSON(flickerAPI, flickrOptions, displayPhotos);) with var flickrOptions defined, but for some reason it's returning a flickrData var is not defined error.
I'll just put it down as a glitch with workspaces. Thanks very much for your response.
Dave McFarland
Treehouse TeacherI'll look into this @scott hetrick. Thanks for following up on this.
Scott Hetrick
7,725 PointsReferenced video is "Displaying the Photos": http://teamtreehouse.com/library/ajax-basics/ajax-and-apis/displaying-the-photos