This forum is now read-only. Please use our new forums! Go to forums

0 points
Submitted by Blank Oneandonly
about 10 years

I dont understand "requests" 16/19

variable named xhr?

Answer 52f155027c82ca0148000412

2 votes

Permalink

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);

points
Submitted by mariajo6817
about 10 years

4 comments

innoserv about 10 years

yes it s correct

IcyIzzy10 almost 10 years

That is totally correct!

Zhouhancheng almost 10 years

I think adding properties into the XMLHttpRequest() is odd

Jason Hanson over 9 years

why in the var xhr = new do you have to GET?

Answer 52e9646b282ae3d3ec003df3

1 vote

Permalink

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.

points
Submitted by jmangsen
about 10 years

Answer 53603d2f282ae30a64000264

1 vote

Permalink

thank you MariaJo6817! that totally helped! I got it all right! I just copy passed ur words! And, yes, ur code IS correct. THANK YOU FOR HELPING!

points
Submitted by IcyIzzy10
almost 10 years

Answer 542b83477c82cad4fe000bfe

1 vote

Permalink

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)

points
Submitted by Jeff
over 9 years

1 comments

Jeff over 9 years

Aaaaand what Ive been staring at was the problem…its not code “a” cademy, just codecademy. oops.

Answer 52d99b75282ae3b61e000011

0 votes

Permalink

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!

points
Submitted by innoserv
about 10 years

5 comments

Blank Oneandonly about 10 years

I think I found it out a couple of hours ago but thanks anyway (=

innoserv about 10 years

tell me please how you fix it thx

Phong Trần about 10 years

I am having the same problem. Anyone has any ideas?

raapstar about 10 years

If you dont put “http:// infront of the website name, you might have trouble (LIke me

innoserv about 10 years

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

0 votes

Permalink

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);

points
Submitted by innoserv
about 10 years

2 comments

mariajo6817 about 10 years

very good

Vini Mello almost 10 years

very good, but..

three arguments is not necessary in XMLHttpRequent():

Answer 53426894282ae39f680012e1

0 votes

Permalink

I did -copy and paste - for all the words, which are on the grey light background and I was carreful with spaces.

points
Submitted by jasmin jasmin
almost 10 years

Answer 538d8d56631fe913d30019b2

0 votes

Permalink

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();

points
Submitted by Patrick Veldboer
almost 10 years