Solved

populate the value of the radio button in coldfusion

Posted on 2007-11-19
2
1,872 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 39

Accepted Solution

by:
gdemaria earned 250 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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

Suggested Solutions

This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

752 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