I started making this simple google chrome extension in javascript. And in the beginning of the code I have the following:
var req = new XMLHttpRequest();
req.open(
"GET",
"http://www.ldoceonline.com/dictionary/manga",
true);
req.onreadystatechange(alert(req.readyState));
The value req.readyState comes to be 1, which means the required page has not been properly fetched. I’m a newbie to Javascript. What’s the problem in my code?
how about something like this
Of course this is all assuming that they are giving you valid data back ie XML or json