Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
85
rated 0 times [  88] [ 3]  / answers: 1 / hits: 38853  / 12 Years ago, thu, january 10, 2013, 12:00:00

Here is my ajax call.



 $.ajax({
type: GET,
url: http://example.com/v1/search?keyword=r,
dataType: jsonp,
crossDomain: true,
success: function (responseString) {
alert(responseString);
},
error: function (xhr, errorType, exception) {
var errorMessage = exception || xhr.statusText;
alert(errorMessage);
}
});


Response from my example url



    {
response: [{
attributes: {
type: enge,
url: /services/data/v24.0/sobjects/Challenge__c/a0GZ0000005Vvh4MAC
},
name: Really,
end_date: 2013-02-07T15:26:00.000+0000,
total: 350.0,
registered_members: 0.0,
id: 30,
type: Design,
id: a0GZ0000005Vvh4MAC,
start_date: 2012-11-19T16:52:00.000+0000,
description: This is my really cool challenge,
remaining_days: 28.0,
categories__r: [{
attributes: {
type: Category__c,
url: /services/data/Category__c/a08Z0000000RNI2IAO
},
id: 0RNI2IAO,
display_name: Andy
}, {
attributes: {
type: Category__c,
url: /services/Category__c/a08Z0000000RNI3IAO
},
id: a0O,
display_name: ADR
}]
}

}],
count: 1
}


i'm trying to make an cross domain call and getting error



jQuery180014405992737595236_1357861668479 was not called


Update



Well i tried to use dataType:json but at that point getting error



No Transport

More From » ajax

 Answers
13

That suggests either a network error or an end point that doesn't return a JSONP response.



(I'm guessing the DNS lookup failure I get when testing it is because that isn't your real URL (please use example.com for example URLs, that is what it is there for) if not, then that is your problem).


[#80967] Wednesday, January 9, 2013, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
alejandro

Total Points: 231
Total Questions: 102
Total Answers: 107

Location: Jordan
Member since Wed, Jun 17, 2020
4 Years ago
alejandro questions
Mon, Jul 18, 22, 00:00, 2 Years ago
Fri, Sep 18, 20, 00:00, 4 Years ago
Thu, Sep 10, 20, 00:00, 4 Years ago
;