Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

populate the value of the radio button in coldfusion

Posted on 2007-11-19
2
Medium Priority
?
1,875 Views
Last Modified: 2013-12-24
In myform I am retrieving the query from the dataabse and based on that values populating fields. How can i deal with radio buttons
My CF
 <cfif qryProgram.hidden eq 1>
             $('hiddenfield2').checked==true;
             <cfelse>
             $('hiddenfield2').checked==true;
             </cfif>

And the client is
  <label id="label" for="hiddenfield">Hide:(Y/N)</label>
            <label for="hiddenfield">Yes</label>
            <span class="hiddenfield1"><input type="radio" id="hiddenfield2" name="hiddenfield" value="1" >
            <label for="hiddenfield">No</label>
            <input type="radio" id="hiddenfield2" name="hiddenfield" value="0" checked></span>
            </div>
<cfif qryProgram.hidden eq 1>
             $('hiddenfield2').checked==true;
             <cfelse>
             $('hiddenfield2').checked==true;
             </cfif>
 
And the client is 
  <label id="label" for="hiddenfield">Hide:(Y/N)</label>
            <label for="hiddenfield">Yes</label>
            <span class="hiddenfield1"><input type="radio" id="hiddenfield2" name="hiddenfield" value="1" >
            <label for="hiddenfield">No</label>
            <input type="radio" id="hiddenfield2" name="hiddenfield" value="0" checked></span>
            </div>

Open in new window

0
Comment
Question by:erikTsomik
2 Comments
 
LVL 39

Accepted Solution

by:
gdemaria earned 500 total points
ID: 20314973
you can place a cfif right in your radio tag to show "checked" or not basing the condition on your data record
<input type="radio" id="hiddenfield2" name="hiddenfield" value="1" <cfif qryProgram.hidden eq 1>checked</cfif> >

Open in new window

0
 
LVL 19

Author Comment

by:erikTsomik
ID: 20314985
The problem is her eI can not do that because I executing the the CF on the server usiong ajaxcfc
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I spent nearly three days trying to figure out how incorporate OAuth in Coldfusion for the Eventful API. Hopefully, this article will allow Coldfusion Programmers to buzz through the API when they need to. Basically, what this script does is authori…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Loops Section Overview

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question