문제

I'm trying to load a Delicious-feed asynchronously using KendoUI, and am running into some weird behavior. My kendo.dataSource looks like this (CoffeeScript):

deliciousData: new kendo.data.DataSource
  transport:
      read:
        url: 'http://feeds.delicious.com/v2/json/steven.langbroek?callback=?'
      dataType: 'jsonp'

And on my widget I have <div class="blog-widget-data_delicious" data-source="deliciousData" data-template="deliciousTemplate">. Now when I load my page I get a console error notifiying me that my domain isn't allowed by access control (the usual when you try to load cross-domain with js). Strange thing is I'm setting my dataType to jsonp, and I have ?callback=? in the URL as suggested by pretty much any tutorial I can find on the matter. Even weirder: when I load it through jQuery's $.getJSON(), I get the results as expected.

Can anyone help me figure out why this would work with jQuery but not with KendoUI?

올바른 솔루션이 없습니다

다른 팁

Not expert in CoffeeScript but dataType is part of read, are you not missing a tab? As far as I understand it should be:

deliciousData: new kendo.data.DataSource
   transport:
      read:
        url: 'http://feeds.delicious.com/v2/json/steven.langbroek?callback=?'
        dataType: 'jsonp'
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top