Solved

populate the value of the radio button in coldfusion

Posted on 2007-11-19
2
1,868 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 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

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…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

910 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now