Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

cfajaxproxy problem

Guest
Aug 28, 2009 Aug 28, 2009

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

1.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 15, 2011 Mar 15, 2011

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 15, 2011 Mar 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 26, 2011 May 26, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 27, 2011 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 03, 2011 Jun 03, 2011
LATEST

I completely forgot to try to createObject, & dump the object. I ran into a strange variable-scope conflict because of this!

I had a cfajaxproxy tag on my page which had worked fine at first.

I made some changes and ColdFusion started giving me the "CFC does not exist" PATHING error message, when in fact it was a scope issue that made itself visible when I dumped the object onto the page, giving me a message like "the variable OPTIONS already exists, use the local scope".

I apparently already had a variable called "options" on the page my proxy was running on and bingo, I'd just created a variable "options" inside my CFC method like this:

<cfset var options = DeserializeJSON(arguments.options)>

Turns out I was DOING IT WRONG, and the var needed it to be in the LOCAL scope, like so:

<cfset var local.options = DeserializeJSON(arguments.options)>

Now ColdFusion actually doesn't throw this strange pathing error message. Just wanted to share this issue in the hopes that it could help others!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources