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 trialTyler Barnes
1,464 PointsXHR finished loading: GET "http://port-80-ss1nh4igdr.treehouse-app.com/sidebar.html". yet nothing changes in browser!
I've looked back and forth between my code and the video over and over trying to find a typo or miscapitalization error but I can't find anything. console is saying its loaded sidebar.html but I can't see it showing up in the browser.
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
document.getElementById('ajax').innerHtml = xhr.responseText;
}
};
xhr.open('GET', 'sidebar.html');
xhr.send();
2 Answers
Tiffany McAllister
25,806 PointsJavaScript is case sensitive so try changing 'innerHtml' to 'innerHTML' and see if that works.
Tyler Barnes
1,464 PointsI actually figured that out right after posting my question but couldn't figure out how to go back to the question. Thank you though!
Tiffany McAllister
25,806 PointsNo problem! Glad you got it figured out :)
Marty Kunsman
Full Stack JavaScript Techdegree Graduate 22,262 PointsMarty Kunsman
Full Stack JavaScript Techdegree Graduate 22,262 PointsI missed capitalizing the L. Thanks for the answer.