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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:45:36+00:00 2026-05-25T23:45:36+00:00

We recently set up a new website on our server: Windows 2K8 R2/IIS7/ColdFusion8 Ent.

  • 0

We recently set up a new website on our server: Windows 2K8 R2/IIS7/ColdFusion8 Ent. A key query which works no problem locally now doesn’t work in production.

Using <cfcontent type="text/json"> in the cfc function below causes the browser to open a download dialog box when a template calls this function.

<cffunction name="getPolls" access="remote" returntype="any" hint="Gets Polls">
    <cfargument name="poll_id" type="numeric" required="true">    
    <cfset var qPoll = 0>
        <cfquery name="qPoll" datasource="#application.datasource#">
            select * from polls where poll_id = #arguments.poll_id#
        </cfquery> 
        <cfcontent type="text/json">
        <cfreturn qPoll>
</cffunction>

Below is the jQuery code which calls the above function. When this code is run inside a template (test.cfm), the download dialog opens asking me to save the file test.cfm rather than actually browsing the template.

$(function(){       
    var poll_id = global_poll_id || 0;
    var uniqueid = new Date().getTime();
    $.getJSON("/cfcs/poll.cfc?method=getPolls&returnformat=json&queryformat=column&uniqueid=" + uniqueid, {"poll_id":poll_id}, function(res,code) {     
        alert(res.ROWCOUNT); // error here
    })
})

If I remove the <cfcontent type="text/json"> from the function, the download dialog no longer appears; HOWEVER, the ajax callback doesn’t seem to fire and an error returns:

res is not defined
  • 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-25T23:45:36+00:00Added an answer on May 25, 2026 at 11:45 pm

    This was related to my application.cfc. I needed to completely remove the onRequest method to get it working.

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

Sidebar

Related Questions

I have recently purchased some new windows server 2008 boxes all running IIS7. I
Recently, we deployed our web-application to a new set of servers. AppServer: Websphere 6.1
We've recently moved our company website to a new host. It is an ASP.NET
I've recently set up cygwin, git, and gitosis on my Windows Server 2003 box
I recently set up a new instance of my personal website on the same
I recently encountered a scenario in which if a set only contained a single
Recently, I was trying to optimise this query UPDATE Analytics SET UserID = x.UserID
I recently set up a new account with github. I'm following a Rails tutorial
I am relatively new to phonegap and I have recently set up HTTPS/SSL on
I recently attempted to set new breakpoints in eclipse to debug service side code

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.