Click here to Skip to main content
15,939,960 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
function checkTicker() {
  var dao = new XMLHttpRequest();

 //"GET", "",true);"GET", "", true);

  dao.onreadystatechange = function() 


What I have tried:

if i use url "" to get json, not problem, and "dao.status" is 200;

but if i use url "baidu" to get json, get nothing , and "dao.status" is 0;

all of this 2 url can get json in chrome .

why url baidu can not get json, and how to do ?
Updated 23-Nov-17 3:55am
F-ES Sitecore 23-Nov-17 10:41am    
Use the browser's network tools to examine the network call and look for any errors that are returned.

1 solution

There is no way anyone here is going to know this. We don't control the code behind those URL's.

You have to contact the people who own those URL's to find out what has to be submitted in your request, including anything that has to be in the headers of your request, in order for the server to understand your query and how to return the response.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900