Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

Uncaught SyntaxError: Unexpected token : for a cross domain json call

$
0
0

Hi gurus, I am trying to make a cross domain json call.

 

Below is my code.

 

var oModel = new sap.ui.model.json.JSONModel();

var url = "http://localhost:8983/solr/collection1/select?q=pdf&wt=json&callback=getJSON" ;

 

$.ajax({

               url : url,

               jsonpCallback : 'getJSON',

               contentType : "application/json",

               dataType : 'jsonp',              

               success : function(data, textStatus, jqXHR) {       

                   oModel.setData(data);

                   sap.ui.getCore().setModel(oModel);

                      },

            error: function(e) {

           alert(e);

               }

});

 

Please suggest me how to resolve token error. I am not finding solution from other blogs.

 

regards,

Siva


Viewing all articles
Browse latest Browse all 6178

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>