What's wrong with this code?
$.ajax({
//url: 'http://ip.jsontest.com/',
// url: 'http://ipinfo.io/json',
//url: 'http://ip-api.com/json',
url: 'http://www.onecert.com.br/json.asp',
success: function(data) {
alert("OK");
},
error: function(dataerror) {
alert("NO");
}
});
I create a CLASSIC ASP that create a JSON (verified on online testers). If I tried any other URL on AJAX its works.. but with this CLASSIC ASP doesn't.
Classic ASP is created with JSON_2.0.2.asp.
<!--#Include File="JSON_2.0.2.asp"-->
<%
Response.ContentType = "application/json"
Dim member
Set member = jsObject()
member("name") = "Daniel"
member("surname") = "Smith"
member("message") = "Hello"
member.Flush
%>
Why? (I'm a beginner)
I tried with Response.ContentType and without. Same Result.
Thanks for all repplies