JavaScript ColdFusion CFC loaded through AJAX returns empty response

I'm having trouble calling a CFC through a jQuery ajax call. I've read at least a dozen articles/Overflows on the topic but cannot get a basic "Hello World" to return to the page. My environment is running ColdFusion 11 on Window 2008 R2 and IIS7.5

Here is my CFC:

<cfcomponent displayname="BU_ldaptest" extends="ADF.apps.BU_Utils.components.App" hint="BU_ldaptest.">
<cfproperty name="version" value="1_0_0">
    <cffunction name="helloWorld" access="remote" returntype="string" output="false">
        <cfreturn "Hello World!">
    </cffunction>
</cfcomponent>

And here is my CFM:

<cfoutput>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
#application.BU_Utils.BU_ldaptest.helloWorld()#
<button onClick="loadCFC();">Load</button>
<script>
    function loadCFC() {
        $.ajax({
            type: "post",
            url: "/ADF/apps/BU_Utils/components/BU_ldaptest.cfc?method=helloWorld",
            cache: false,
            success: function(msg) {
                $("##result").html(msg);
                console.log(msg);
            },
            error: function(msg) {
                $("##result").html("Failed");
            }
        });
        console.log("function execute");
    };
</script>
<div id="result">...</div>
</cfoutput>

In the CFM, that "#application.BU_Utils...#" variable does correctly print "Hello World!" in the browser.

I do not have any Web Services setup in the CF Admin interface, are they required for something like this to work? I also know that I'll eventually want my cfc to return JSON, which it will once I can just get this simple string to print out. I've gone through this Overflow over and over... Invoke ColdFusion function using AJAX

Thank you.

Answer:1

I want to loop over an array of arrays structure in order to filter out the duplicate datetime string values, and push the unique datetime string values sorted in a new array. I have tried to use a ...

I want to loop over an array of arrays structure in order to filter out the duplicate datetime string values, and push the unique datetime string values sorted in a new array. I have tried to use a ...

  1. unique datetime string c#

last time I found this piece of code included in some tutorial. It just prints the numbers in the defined range. <!DOCTYPE html> <html lang="pl"> <html> <head> ...

last time I found this piece of code included in some tutorial. It just prints the numbers in the defined range. <!DOCTYPE html> <html lang="pl"> <html> <head> ...

  1. javascript write function with callback
  2. javascript write function return value
  3. javascript write function
  4. javascript write function as string
  5. javascript write function with parameter
  6. javascript write function example
  7. write javascript function in html
  8. write javascript function in onclick
  9. write javascript function in typescript
  10. write javascript function in console
  11. write javascript function in html tag
  12. write javascript function in php
  13. write javascript function in ts file
  14. write javascript function in react
  15. write javascript function inside onclick
  16. write javascript function in js file
  17. javascript function write text
  18. javascript function write to file
  19. write javascript function in code behind c#
  20. write javascript function inside html

I have an array of objects which I wish to convert into a plain Immutable map of: name: { urlname id } Currently I am doing the following data being the array of objects: data = data.map((data) ...

I have an array of objects which I wish to convert into a plain Immutable map of: name: { urlname id } Currently I am doing the following data being the array of objects: data = data.map((data) ...

  1. convert array objects to json
  2. convert array objects to string
  3. convert array objects to string javascript
  4. convert array objects javascript
  5. converting array to object php
  6. convert array of objects to list c#
  7. convert array of objects to json javascript
  8. convert array of objects to map javascript
  9. convert array of objects to json c#
  10. convert array of objects to csv javascript
  11. convert array to objects
  12. convert array of objects to csv
  13. convert array of objects to list java
  14. convert array of objects to key value pair
  15. convert array of objects to json php
  16. convert array of objects to json python
  17. convert array of objects to string javascript
  18. convert array of objects to dictionary swift
  19. convert array of objects into json
  20. convert array of objects to json swift

I want to disable and replace the vertical scroll with horizontal one in Vanilla JavaScript. I am blocked when I try to replace my scroll values. I trust there is a simple simple (really simple) ...

I want to disable and replace the vertical scroll with horizontal one in Vanilla JavaScript. I am blocked when I try to replace my scroll values. I trust there is a simple simple (really simple) ...