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?
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.
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.
Copy link to clipboard
Copied
The documentation is a pretty good source for discussion and examples.
http://livedocs.adobe.com/coldfusion/8/htmldocs/ajaxui_1.html
http://livedocs.adobe.com/coldfusion/8/htmldocs/ajaxdata_01.html
http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_a-b_3.html#3983510
http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_a-b_2.html#3980738
Copy link to clipboard
Copied
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...