incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Toni Thomä <t...@filbert.org>
Subject Unexpected token on jsonp request
Date Fri, 29 Jul 2011 18:16:37 GMT
hello, 
i´m firing an ajax/jsonp reqeust to my cloudant app: 

        var obj = $.ajax({
            url: "http://xyz",
            dataType: 'jsonp',
            success: function(data) {  
                //SOME CODE  
            },
            error: function() {
                //SOME CODE
            }
        });

most of the time the response is ok and i can read out my data. 
but sometimes I´m getting the following error (with the same query string that already worked):


	Resource interpreted as Script but transferred with MIME type text/plain.
	Uncaught SyntaxError: Unexpected token :

i need to make this request an jsonp request, AFAIK jsonp returns as a script and gets executed
by the browser. 
do i have to set a request header? 
(I´m using GoogleChrome)

cheers, 
toni 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message