There is a server and its ip address. On the server there is a file (cgi), which is accessed from the outside and it gives json accordingly, depending on the request. Addressing directly to the ip address from the browser line, all data is displayed correctly, but when there is a call from the script:
$.ajax({ type: "GET", url: 'http://<ip-address>/cgi-bin/api1.0/Tables?ip=localhost&port=9858¶m=m', // data: myData, dataType: "text", success: function (data) { document.getElementById("info").innerHTML = data; }, error: function (data, status, errorThrown) { alert(status + errorThrown); } }); }); That throws out an error (the request reaches the server exactly), although the call to other servers, for example, by the domain name with the parameters goes correctly and the data is displayed correctly. What can be the problem?