Copy link to clipboard
Copied
Hello,
I need to get some data from a js file, and process it through cf/db tag.
What is the best way? I think it should be asynchronous, but I have still to get the principles of js to cf communication.
Thanks!
Copy link to clipboard
Copied
The js has to make an http request to a cf page. This page might give you some ideas. http://www.google.ca/#hl=en&source=hp&biw=1280&bih=885&q=javascript+httprequest&aq=0&aqi=g10&aql=&oq=javascript+htt&fp=4f06745222af36bd
Copy link to clipboard
Copied
In order to do an http request, you an use many of the great JS options incorporated into CF like :
ColdFusion.Ajax.submitForm
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=JavaScriptFcns_03.html
for example you can create a form on your page that will be set with data via JS and posted to a CF page.
Also you can use the ColdFusion.navigate
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=JavaScriptFcns_24.html
in order to navigate to a certine page with info, letting that page handle the CF.
If you need more info, or examples, let me know
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more