Skip to main content
August 28, 2009
Question

cfajaxproxy problem

  • August 28, 2009
  • 2 replies
  • 1849 views

Hi everyone,

  i have a little problem using the cfajaxproxy tag or any other tag using ajax.
 
  here is a the code
 
  <cfajaxproxy cfc="mdh.dev.test.proxy" jsclassname="proxy" />
 
 
  function testFunction() {
        var instance = new proxy();
        instance.setCallbackHandler(functionSuccess);
        instance.testing();
    }

    the result in the source will be:
   

<script type="text/javascript">
    var _cf_proxy=ColdFusion.AjaxProxy.init('/dev/test/test/proxy.cfc','mdh.dev.test.proxy');
    _cf_proxy.prototype.testing=function() { return ColdFusion.AjaxProxy.invoke(this, "testing", {});};
</script>


the " mdh " is a logical mapping in coldfusion admin and in IIS

i can't find why the url is trunked in the source result.

instead of being
var _cf_proxy=ColdFusion.AjaxProxy.init('/mdh/dev/test/test/proxy.cfc','mdh.dev.test.proxy');

it create
var _cf_proxy=ColdFusion.AjaxProxy.init('/dev/test/test/proxy.cfc','mdh.dev.test.proxy');

anyone else having this problem ?

tyvm

    This topic has been closed for replies.

    2 replies

    BKBK
    Community Expert
    Community Expert
    March 15, 2011

    It's very likely a path problem. Verify, using

    <cfset testObject=createobject("component","mdh.dev.test.proxy")>
    <cfdump var="#testObject#">

    Then you will know whether the path is correct.

    Participating Frequently
    May 27, 2011

    I have a related question:

    <cfset testObject=createobject("component","mdh.dev.test.proxy")>

    what values for createobject() would I use if my testing server is

      http://192.168.1.128:8500/mdh/dev/proxy.cfc

    and my file, under windows, is located at: C:\ColdFusion8\wwwroot\mdh\dev\test\proxy.cfc ?

    what values for createobject() would I use if my testing server is

      http://192.168.1.128:8500/mdh/dev/proxy.cfc

    and my file, under windows, is located in a different folder: C:\ColdFusion8\wwwroot\mdh\CFCs\proxy.cfc ?

    Thanks

    BKBK
    Community Expert
    Community Expert
    May 27, 2011

    dgleneck@ndi-inc.org wrote:

    > my file, under windows, is located in a different folder: C:\ColdFusion8\wwwroot\mdh\CFCs\proxy.cfc ?

    You already know the location of your file, which is mdh.CFCs.proxy in dotted notation. That was possibly the problem in the original post.

    Participant
    March 15, 2011

    Have you found the answer for your question?  I am running into the same problem.  Thx!