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 trialMark Crimi
4,653 PointsAJAX Concepts Challenge task 1 of 2
var request = new XMLHttpRequest();
request.onreadystatechange = function () {
if (request.readyState === 4) {
document.getElementById("footer").innerHTML = request.responseText;
}
};
xhr.open('GET', footer.html);
Trying to open AJAX request using above. It's not passing the challenge. Can anybody give me a hint? Thanks
2 Answers
sitkibagdat
27,311 PointsThere is only a naming issue. Use request instead of xhr and add quotes around to footer.html like below
request.open('GET', 'footer.html');
Mark Crimi
4,653 PointsI figured it out. I feel like an idiot. Thank you though.