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

js > cf

New Here ,
Apr 23, 2011 Apr 23, 2011

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!

TOPICS
Getting started
506
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
LEGEND ,
Apr 23, 2011 Apr 23, 2011

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

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
Participant ,
Apr 24, 2011 Apr 24, 2011
LATEST

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

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