This forum is now read-only. Please use our new forums! Go to forums
I dont understand "requests" 16/19
variable named xhr?
Answer 52f155027c82ca0148000412
This codice in right the correction my friends is var xhr = new XMLHttpRequest(“get”,”http://www.codecademy.com/",false); xhr.open(“GET”,”http://www.codecademy.com/",false);
xhr.send();
console.log(xhr.status); console.log(xhr.statusText);
Answer 52e9646b282ae3d3ec003df3
Here is what I got here: var xhr = new XMLHttpRequest(); xhr.open(“GET”, “http://www.codecademy.com/“, false); xhr.send();
Looks like you need a semicolon after your first line. Also, it looks like you forgot to call the send on xhr at the end.
Answer 53603d2f282ae30a64000264
Answer 542b83477c82cad4fe000bfe
I can’t get past “Requests” - I get “NetworkError: NetworkError” in IE and some other error in Firefox.
var xhr = new XMLHttpRequest(); xhr.open(“GET”,”https://www.codeacademy.com/",false); xhr.send();
(Tried with and without var)
1 comments
Aaaaand what Ive been staring at was the problem…its not code “a” cademy, just codecademy. oops.
Answer 52d99b75282ae3b61e000011
i have a same problem // Add your code below this line!
// Add your code above this line!
var xhr = new XMLHttpRequest(). xhr.open(“GET”,”http://www.codecademy.com/",false); console.log(xhr.status); console.log(xhr.statusText); a get an error ============================================ Oops, try again. Did you set xhr equal to new XMLHttpRequest(), then call xhr.open() with the arguments listed? Check the Hint if you need help!
5 comments
I think I found it out a couple of hours ago but thanks anyway (=
tell me please how you fix it thx
I am having the same problem. Anyone has any ideas?
If you dont put “http:// infront of the website name, you might have trouble (LIke me
the anser is var xhr = new XMLHttpRequest(“get”,”http://www.codecademy.com/",false); xhr.open(“GET”,”http://www.codecademy.com/",false);
xhr.send();
console.log(xhr.status); console.log(xhr.statusText);
Answer 52e96cee52f863465e004228
the correction my friends is var xhr = new XMLHttpRequest(“get”,”http://www.codecademy.com/",false); xhr.open(“GET”,”http://www.codecademy.com/",false);
xhr.send();
console.log(xhr.status); console.log(xhr.statusText);
2 comments
very good
very good, but..
three arguments is not necessary in XMLHttpRequent():
Answer 53426894282ae39f680012e1
I did -copy and paste - for all the words, which are on the grey light background and I was carreful with spaces.
Answer 538d8d56631fe913d30019b2
indeed three arguments on the XMLHttpRequest is unnecessary. just use it like below to keep you code clean;
xhr = new XMLHttpRequest(); xhr.open(“GET”, “http://www.codecademy.com/“, false); xhr.send();
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
4 comments
yes it s correct
That is totally correct!
I think adding properties into the XMLHttpRequest() is odd
why in the var xhr = new do you have to GET?