Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
CFAjaxproxy not starting from root. #25
CFInvoke properly starts from root when used. However, CFAjaxproxy starts from the directory it is in and never goes out to root. I am not sure how I can put a code sample in because there is no way to show that it is not working correctly inside the code block, as it is not the code example that is the issue.
CFML Document location:
When page is run, CJAjaxproxy fails:
But if you use cfinvoke component="cfc.stamps" it will function as it should.
Thank you. I do have 1 question though, with out this, how does one get out of the directory they are in and access a cfc in another directory? I have been writing cffunctions that use cfinvoke to get to a different folder since all I can do is go deeper in the current directory and nothing else.
RPC endpoints are super easy to work with, but cfajaxproxy makes it even simpler.
Without it you'd have to not use cfajaxproxy but directly call the CFC and function like so:
Assuming your component lives under the subfolder components.
Specify returnformat="JSON" in your function and you're all set.
Save to your root directory as mycomp.cfc and you can call it with "/mycomp.cfc?method=getPosts&authorId=123" from any AJAX client.