1

The problem. After calling a Coldfusion Componet method I receive the following message: Resource interpreted as Script but transferred with MIME type text/html. This was not an issue a couple of days ago. I am calling other methods associated with this component and am getting the desire result. When I actually run the method directly on the coldfusion server I get the response I am expecting in the format I am expecting. There seems to be some unwanted translation going on somewhere.

Here is the $.ajax code:

$.ajax({
 type: "GET",
 dataType: "jsonp",
 cache: false,
 data: calculate_radius(),
 url: "components/components.cfc?method=tester",

success: function(response) {

},
error: function(response) {
 console.log(response);
 var response_data = JSON.parse(response.responseText);
 images = response_data;
}
})
} 

Here is the Coldfusion method:

<cffunction name="tester" access="remote" retunformat="json">
    <cfset test = 'random text to send back'>
    <cfreturn test>
  </cffunction>

I am really stumped here can someone please help. Sorry for the localhost link, that's the only way I can work through this thing until I am able to get it hosted on a web server.

0 Answers0