2 Replies Latest reply on Jan 28, 2009 4:20 PM by budzilla1

    cfajaxproxy hangs

      I'm having trouble getting cfajaxproxy to return the result from my function. I can call the function and get a response when I use <cfinvoke>, but when I use cfajaxproxy the function hangs at the <cfreturn> statement. Here's my function code:

      <cfset myReturnFoo = "foo">
      <!--- code hangs here when called by cfajaxproxy--->
      <cfreturn myReturnFoo>

      And here's how I'm calling it:
      <cfajaxproxy cfc="idiot" jsclassname="idiot_proxy" />

      function getHoser() {
      var instance = new idiot_proxy();

      function getHoserSuccess(result) {
      alert("In getHoserSuccess");

      function init() {

      Any help would be greatly appreciated.
        • 1. Re: cfajaxproxy hangs
          Level 7
          1) when using cf ajax features, one must declare in-page js functions as
          functionName = function() {
          and NOT as
          function functionName() {

          2) you MUST have getHoserFailure js function defined in your script - do
          you have it and just didn't post it?

          3) in cf admin, enable ajax debugger, then add ?cfdebug to your URL to
          see the pop-up ajax debugger window - it may very well give you more
          info about any errors occurring with your cfajaxproxy.

          4) VAR you variables inside cfc functions! use <cfset var MyReturnFoo =
          "foo">. but in a simple test function like yours you do not even need to
          set the variable - you can just do <cfreturn "foo">

          Azadi Saryev
          • 2. Re: cfajaxproxy hangs
            budzilla1 Level 1
            Thanks Azadi. Unfortunately, none of your suggestions bore fruit. I do have the failure handler script defined, but just didn't post it. I had my web server admin enable Ajax debugging, but I don't see any pop-up window that gives me any error messages. I'm using firebug, and the only message I get is "Remote CFC timed out while waiting to execute."

            The strange thing is that I had some fairly intensive data exchanges working two weeks ago when I last looked at it. Now, I can't even pass a string back. :(