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

(CF8) cfform ajax postback

New Here ,
May 14, 2009 May 14, 2009

Copy link to clipboard

Copied

I'm trying to create a simple ajax postback using a cfform and coldfusion 8.

<cfform>

<cfinput type="radio" name="val" value="1">
<cfinput type="radio" name="val" value="2">
<cfinput type="radio" name="val" value="3">
</cfform>

<cfoutput>#form.val#</cfoutput>

When a radio button is selected I want it to update the value without refreshing the page.

What is the best way to do this?

TOPICS
Advanced techniques

Views

1.5K

Translate

Translate

Report

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
Valorous Hero ,
May 14, 2009 May 14, 2009

Copy link to clipboard

Copied

AJAX functionality will allow you to do that.

The documentation will tell you how to get started with the ColdFusion features that help you create AJAX functionality.

There are other frameworks that help with this as well such as JQuery.  Their documentation will describe how to use their tools.

Or you can roll your own.

Votes

Translate

Translate

Report

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 14, 2009 May 14, 2009

Copy link to clipboard

Copied

Hi Ian,

I want to perform this with coldfusion. Unfortunately the coldfusion support centre is not very helpful for people looking to learn the new features. All the documentation is on basic html pages with no links to real life examples.

I have tried this method.

<cfdiv>

<cfinput type="radio" name="val" value="1" onClick="submit()">
<cfinput type="radio" name="val" value="2" onClick="submit()">
<cfinput type="radio" name="val" value="3" onClick="submit()">
</cfform

<cfoutput>#form.val#</cfoutput>

<cfdiv>

This works, however the  onClick="submit()" refreshes the page which is not what i need.

Votes

Translate

Translate

Report

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
Valorous Hero ,
May 14, 2009 May 14, 2009

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

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 15, 2009 May 15, 2009

Copy link to clipboard

Copied

LATEST

I think we will have to agree to disagree on this one Ian.

There is no discussion on these, most of the articles have 0 comments. The only comment have have spotted are ones which are pointing out the mistakes that adobe have made with the code in the documentation... which don't appear to have been corrected.

We're online, so why only quote script like in a textbook when you can provide working examples?


Adobe can do better...

Votes

Translate

Translate

Report

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
Documentation