My app was working fine until I moved from 5.3.7.047 to 6.0.0.585 and found that cfajaxproxy was no longer available. Ok, so I hit the web to look for alternatives and settled on:
The problem I have is how to access the returnvariable so that I can pass it to function for processing. a cfdump var=“#resultCFC#” shows it, and identifies it as a struct, but that’s the only access I have been able to get.
What is your goal in this code? It woukd hold in that variable the result of calling that getWinestyles method.
Since you call it resultcfc, though, I sense you expected it to be an instance of that cfc. If so, that’s what’s in the mycomponents variable of the previous cfobject call: indeed, that’s what allowed you to invoke this method on that cfc instance.
If you “knew all this”, OK. Just help us again to know what you did seek.
Thank you for the response. What I’m trying to say is that everything worked well until I was unable to use cfajaxproxy. With that command available, in order to retrieve the contents of a database table using the cfc getWinestyles, was to:
I should have explained that all of my application is written in javascript, so having to use CF means I have to know how to pass variables back and forth between CF and JS and I was hoping that someone else may have already done this.
It is a little unclear to me where you are trying to call the wineclubComponents.getWinestyles method. You are either:
Calling it on the same page that you have your JavaScript being output and need to get the resultCFC variables into a format that JavaScript can use.
If this is the case, you should be able to do something like:
Or are wanting to make an ajax request to get the resultCFC data from a remote call. If this is the case then you should look at something like Axios to replace your old cfajax code: Getting Started | Axios Docs
Well, it seems I must be screwing up somehow because I’m now getting errors from working code which hasn’t been touched. This is all too hard for what is essentially a hobby coding exercise. I’m going back to my previous version of Lucee 5.3.7.047 where everything worked 'cos I had cfajaxproxy. Thank you all for your assistance.