Victor Palson
Victor Palson

Reputation: 1

Calling external domain web service using backbone.js

while i am calling external domain service, I get error like this, XMLHttpRequest cannot load. Is it possible to load external domain service response? from backbone js. While i am trying to load it load it as a empty response. How to fix this issue?

Upvotes: 0

Views: 113

Answers (1)

David Sulc
David Sulc

Reputation: 25994

You need to set dataType to jsonp in the options hash of (e.g.) your fetch call. See for example http://blog.blairvanderhoof.com/post/56277707617/fetching-a-backbone-js-model-or-collection-with-jsonp

Upvotes: 1

Related Questions