Closed (duplicate)
Project:
Views Datasource
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
19 Oct 2011 at 14:45 UTC
Updated:
9 Sep 2013 at 21:36 UTC
I try to get jsonp but i receive this error Uncaught SyntaxError: Unexpected token :
Is jsonp supporti n this module, how i must configure it?
$.ajax({
url: 'http://www.example.com?callback=?',
dataType: 'jsonp',
jsonp: 'jsoncallback',
timeout: 5000,
success: function(data, status){
$.each(data, function(i,item){
var landmark = '<h1>'+item.title+'</h1>'
+ '<p>'+item.body+'<br>'
+ ' '+'</p>';
output.append(landmark);
});
},
error: function(){
output.text('There was an error loading the data.');
}
});
Comments
Comment #1
SilviaT commentedSame problem here with D7.
I've seen there's another issue about this for D6 (http://drupal.org/node/606332) but I was wondering is it supposed to work in the D7 version or not?
Comment #2
oskar_calvo commentedI have the same problem.
What happens with this?
The json-p is a very important part of any drupal configuration if we want to drupal as a banck-end for mobile apps.
Anything news about this, or how to configure the views to get a correct json-p callback?
Thanks
Oskar
Comment #3
alexander allen commentedCould you post an example the output you are getting from the views_datasource module?
Thank you,
Richard
Comment #4
oskar_calvo commentedHere is my jsonp code:
And I can attach also the view if you need it.
Comment #5
yannickooThis is also a duplicate of #1673488: JSONP has no dynamic callback.