JQuery get () AJAX only returns spaces

I'm trying to make a jQuery get () AJAX call, but the answer is just a blank. It's not empty, but a series of empty lines and what appears to be spaces and tabs. Here is jQuery:

$("#package-list a").click(function(event){
  var packageID = this.hash.split("#")[1];  //Get the package ID from the link hash, then split off the hash.
    {n:packageID},   //parameters
    function(data){  //callback


And here is the ColdFusion call to the database (key-ajax.cfm):

<cfprocessingdirective pageEncoding="utf-8">
<cfquery name="treePackages" datasource="#application.dsn#">
  SELECT id, dateCreated, n, name, fileName, sizeKB
    , product1Name, product1Link, product2Name, product2Link, product3Name, product3Link
  FROM ref_color_keys
  WHERE n = #url.n#


When the response comes back, it looks like an empty box, but I can select the "text" inside, which, as I said, is empty lines, spaces and tabs. If I query the database in a static way, I can access the data as expected.

I don't think this is a cross-domain issue, if only because I am calling jQuery from Google CDN code.

Thank you for your help.


source to share

1 answer

You don't output anything, you just make a request.

Try this after asking:





All Articles