Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7641405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:54:52+00:00 2026-05-31T08:54:52+00:00

I am trying to make a jQuery get() AJAX call, but the response is

  • 0

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

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

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#
</cfquery>

When the response comes back, it looks like an empty box, but I can select “text” inside, which, as I said before, appears to be blank lines, spaces and tabs. If I query the database in a static way, I am able to access the data as expected.

I don’t think this is a cross-domain issue, unless it’s because I’m calling jQuery from Google’s code CDN.

Thanks for your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T08:54:54+00:00Added an answer on May 31, 2026 at 8:54 am

    You’re not outputting anything, you’re just making a query.

    Try this after the query:

    <cfoutput>#serializeJson(treePackages)#</cfoutput>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a drop down menu using javascript/jquery but can't get my
I trying to make my first AJAX with JSON call using jQuery and CodeIgniter.
I am trying to make an ajax call using jquery in my spring MVC
I'm trying to make a jquery plugin but it's not working what a'm i
I'm trying to make a jQuery .ajax() call to a public web service, and
I am trying to make a ajax call to other domain locally from my
Trying to find out why this jQuery JS isn't making ajax call though it
I'm trying to make an Ajax call on all <a> elements inside the id
I'm trying to make an editable table for a tournament using jQuery and ajax.
I am trying to make AJAX calls using the jQuery .load() method. When the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.