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

i want to use DOM traversal to load ajax when i click the button .. below is my work space

https://w.trhou.se/7br7gjyfxl

2 Answers

Steven Parker
Steven Parker
229,745 Points

I noticed a few issues:

  • there is no HTML element with a class name of "AJAX" as referenced on line 14 of app.js
  • the event listener is attached directly to the button, so the class name check is probably not needed
  • on line 15, "event.target" might be read-only (it certainly should be!)
  • on line 25 of index.html, the tag name (in 2 places) should be "script" instead of "sript"

steve see if you can help me out here https://teamtreehouse.com/community/ajax-11