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 trialTinashe Musuma
11,921 PointsAJAX not getting into action. getting "Not Found The requested URL /sidebar.htlm was not found on this server." error
i have been following along in workspaces but when i launch my preview for the AJAX to get into action i get an error code saying
"Not Found The requested URL /sidebar.htlm was not found on this server."
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function (){
if (xhr.readyState === 4){
document.getElementById('ajax').innerHTML = xhr.responseText;
}
};
xhr.open('GET', 'sidebar.htlm');
xhr.send();
That is how my code looks like in my htlm
2 Answers
Zoltán Holik
3,401 Pointsyou had a mistype. :) .html not .htlm
//mistyped code
xhr.open('GET', 'sidebar.htlm');
//fixed code
xhr.open('GET', 'sidebar.html');
Tinashe Musuma
11,921 Pointsohhh i had missed that. Thanks a lot