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 6903489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:55:55+00:00 2026-05-27T07:55:55+00:00

I am getting a blank response. I even hard code a response. I use

  • 0

I am getting a blank response. I even hard code a response. I use firebug and copy the location with parameters and it shows a response when i paste it in my browser.

Code:

<script type="text/javascript">
$(document).ready(function(){
    $("#mySubmitButton").click(function(){
        var zipCodeFilter = $('input[name=zipCodeFilter]').val();
        var zipRadius = $('select[name=zipRadius]').val();
        var querystring = "zipCodeFilter="+zipCodeFilter+"&zipRadius="+zipRadius;
        $.ajax(
            {
                type: "POST",
                dataType: "json",
                url: "http://dev.lead-hub.com/datasource/dataAccess.cfc?method=getZipCodes&returnformat=json",
                data: querystring,
                success: function(response){
                    var resp = jQuery.trim(response);//getting alot of whitespace in my return CFC method
                    alert(resp);
                    return false;
                    if (resp == 'true'){
                        $('#loginResponse').html("<span style='color: green;font-weight: bold; font-size: 15px;'>Success!!</span>");
                        // you'll want to put your code here to move onto the next page. I would simply do a page refresh
                        // and continue with using the session's login data
                    }else{
                        $('#loginResponse').html("<span style='color: red;font-weight: bold; font-size: 15px;'>Failed!!</span>");
                    }
                    return false;
                    }
                }
            );
        });
    }
);

Code For CFC:

<cffunction name="getZipCodes" access="remote" returnType="string">
    <cfargument name="zipCodeFilter" required="true" type="numeric">
    <cfargument name="zipRadius" required="true" type="numeric">
    <cfset var local = {} />
    <cfset local.getZipCodes = "" />        
        <cfquery name="local.getZipCodes"  dataSource="#application.dns_live#">
            SELECT h.*
            FROM tbl_zipcodes g
            JOIN tbl_zipcodes h ON g.zipcode <> h.zipcode
            AND g.zipcode = '#arguments.zipCodeFilter#'
            AND h.zipcode <> '#arguments.zipCodeFilter#'
            WHERE g.GeogCol1.STDistance(h.GeogCol1)<=(#arguments.zipRadius# * 1609.344)
        </cfquery>
        <cfset local.returnString = "Good" />
    <cfreturn local.returnString />
</cffunction>
  • 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-27T07:55:56+00:00Added an answer on May 27, 2026 at 7:55 am

    Since you’re getting a blank response in firebug, but you see the value you expect when you access the URL directly in the browser, it strikes me as a possible caching issue. Try adding “cache: false” to your ajax setup:

    $.ajax({
        cache: false,
        type: "POST",
        dataType: "json",
        url: "http://dev.lead-hub.com/datasource/dataAccess.cfc?method=getZipCodes&returnformat=json",
        data: querystring,
        success: function(response){
            var resp = jQuery.trim(response);//getting alot of whitespace in my return CFC method
            alert(resp);
            return false;
            if (resp == 'true'){
                $('#loginResponse').html("<span style='color: green;font-weight: bold; font-size: 15px;'>Success!!</span>");
                // you'll want to put your code here to move onto the next page. I would simply do a page refresh
                // and continue with using the session's login data
            }else{
                $('#loginResponse').html("<span style='color: red;font-weight: bold; font-size: 15px;'>Failed!!</span>");
            }
            return false;
        }
    });
    

    edit

    Since that wasn’t it – another thought occurred to me. You say it works for you when you paste the parameters in your URL and request it directly. That means you’re requesting your method with a GET request, passing the parameters in the URL scope. This is different than your ajax request, since that is type: “POST”. Try changing your ajax to type: “GET” and see if you start getting something back.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Getting the above error in following code. How to rectify it. Thanks. Please look
reference from: Merging Variable PHP I have problem with $_POST getting blank null after
When do I actually get my response code 200 for a valid request for
friends, i am getting following webservice response from dotnet service. <Bank> <bankID>1</bankID> <bankName>AIK Banka</bankName>
I'm getting confused by bank switching in PIC assembler... This works for putting a
I'm getting some weird black spots with a custom map page (via the Google
Getting the subdomain from a URL sounds easy at first. http://www.domain.example Scan for the
Getting started with jquery and having trouble getting hello world type example going for
Getting started with NHibernate How can I generate identity fields in nHibernate using Hilo
Getting started with TDD and I want to ground up a Repository-driven Model. However,

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.