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

  • Home
  • SEARCH
  • 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 6544867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:31:04+00:00 2026-05-25T11:31:04+00:00

Update2: Here is jQuery included (along with current jQuery): <script type=text/javascript src=/honors/thesis_submission/js/jquery-ui.js></script> domain is

  • 0

Update2:

Here is jQuery included (along with current jQuery):

<script type="text/javascript" src="/honors/thesis_submission/js/jquery-ui.js"></script>

domain is http://uwf.edu

$(document).ready(function() {
$('#advisor_email').autocomplete({source: "/honors/thesis_submission/cfc/advisors.cfc?method=advisorLookUp&returnFormat=json", minLength: 2});
});

Updated method:

<cffunction name="advisorLookUp" access="remote" output = "false" returntype="any">
        <cfargument name="term" type="string" required="no">
        <cfset var advisorLookUp = "">
        <cfset var a = []>
        <cfset var s = {}>

        <cfquery name = "advisorLookUp" datasource = "#dsn#">
        SELECT id, email
        FROM budPerson
        WHERE email like <cfqueryparam cfsqltype="cf_sql_varchar" value = "#trim(arguments.term)#%">
        </cfquery>

        <cfloop query = "advisorLookUp">
            <cfset s = StructNew()>
            <cfset s["id"] = id>
            <cfset s["label"] = email>
            <cfset s["value"] = email>
            <cfset arrayAppend(a,s)>
        </cfloop>


        <cfreturn a>
    </cffunction>

Form:

<cfform enctype="multipart/form-data" name = "coversheet">
<!-- other fields excluded -->
<input name="advisor_email" type="text" id="advisor_email" size="40"> 
<!-- other fields excluded -->
</cfform>

Note again…I was able to get this working by putting the SAME code that is in my method on a regular cfm page and just cfoutputing…weird much? :\ I’d like to get it working through the remote method in my cfc.

Update:

Switch to jQuery UI and updated my code to match it. I’m still not getting a response remotely from my method.

—

I’m trying to setup a jQuery Autocomplete plugin (specifically: http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/).

I would just use the coldfusion build in autocomplete, but it was not working for me (giving me an error that apparently I can do nothing about.)

Anyway, my remote method in my cfc will not give me a response. Firebug acts like it is all good and stuff, but doesn’t actually give me a return.

Here is my function:

<cffunction name="advisorLookUp" access="remote" returntype="any">
        <cfargument name="q" type="string" required="yes">
        <cfset var advisorLookUp = "">
        <cfset var arr = "">


        <cfquery name = "advisorLookUp" datasource = "#dsn#">
        SELECT id, email
        FROM budPerson
        WHERE email like <cfqueryparam cfsqltype="cf_sql_varchar" value = "#trim(arguments.q)#%">
        </cfquery>

        <cfsavecontent variable="arr">
        <cfoutput query = "advisorLookUp">
            #advisorLookUp.email# | #advisorLookUp.id# 
        </cfoutput>
        </cfsavecontent>

        <cfreturn arr>
</cffunction>

I have the return being formatted the way the plugin wants. Well, that doesn’t really matter I guess…I really just want to know I’m getting a response (which I’m not at the moment).

Here is my jQuery calling the method:

$('#advisor_email').autocomplete(
     "/honors/thesis_submission/cfc/advisors.cfc?method=advisorLookUp&returnFormat=json");

I’ve tested the method without the jQuery by just doing a invoke and it works just fine. Any ideas?

  • 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-25T11:31:04+00:00Added an answer on May 25, 2026 at 11:31 am

    Which version of ColdFusion are you running? If not the latest (version 9) then you may need to add the following if-statement to the onRequestStart() method in your Application.cfc to address a bug whereby the presence of the onRequest() function messes with remote calls:

    <cffunction name="onRequestStart" returnType="boolean" output="false">
        <cfargument name="thePage" type="string" required="true">
    
        <!--- Other code in your onRequestStart method --->
    
        <!--- Add the following to the end of your onRequestStart method --->
        <cfif ListLast( arguments.thePage,"." ) IS "cfc">
            <cfset StructDelete( this, "onRequest" )>
            <cfset StructDelete( variables,"onRequest" )>
        </cfif>
        <cfreturn true>
    </cffunction>
    

    This detects if the request a remote cfc call and removes the onRequest function.

    (NB: Make sure “arguments.thePage” matches whatever name you have declared for that argument. Some people name it TargetPage or such like. Doesn’t matter as long as it matches the name you declare.)

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

Sidebar

Related Questions

i have following lines included at the bottom of my index.php: <script type=text/javascript language=javascript
I have this jQuery simple code: <script type=text/javascript> <!-- jQuery(function(){ jQuery('#old_thumb').click(function(){ $(this).val($(this).attr('title')); $('#sf').val('2'); $('#add_new_event').submit();
Here is the updated question: the current query is doing something like: $sql1 =
If you have too many javascript file includes with a compositescript in a script
I'm trying to write a Greasemonkey script, and would like to use the jQuery
I have the following Javascript/jQuery function: function addEventHandler(){ $(div).mouseenter(function() { $(this).html(Over); }).mouseleave(function() { $(this).html(Out);
///////UPDATE - I already have jquery library included to my code so if its
Here's my conundrum: I have a page that uses Google Maps V3 and jQuery.
I am not very familiar with java-script/ jquery. i am creating a sliding social
Here's a live demo of the issue on JS Fiddle. I have some jquery

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.