This will do it <input type="radio" id="apple" name="Fruit" value="Apple" <cfif qryResults.Fruit EQ "Apple">checked="checked" </cfif> /> <input type="radio" id="mango" name="Fruit" value="Mango" <cfif qryResults.Fruit EQ "Mango">checked="checked" </cfif> /> <input type="radio" id="orange" name="Fruit" value="Orange" <cfif qryResults.Fruit EQ "Orange">checked="checked" </cfif> >
Where qryResults is the data returned from your datbase On Tue, Nov 11, 2008 at 4:34 AM, Damayanti Gupta <[EMAIL PROTECTED]>wrote: > HI, > I guess this is a rather basic question, but I am really having a hard time > finding a solution. > > I have a group of radio buttons. Data from the db should determine which > button is checked. How do I set this? > > It is like this - the code for intitial display of the page is like- > > <input type="radio" id="apple" name="Fruit" value="Apple" > checked="checked"/> > <input type="radio" id="mango" name="Fruit" value="Mango" > > <input type="radio" id="orange" name="Fruit" value="Orange"> > > Depending on data I retrieve, I may want to change the button selection to > "Orange". How do I do this? > > Thanks a lot > DG > > STATEMENT OF CONFIDENTIALITY: > The information contained in this electronic message and any attachments to > this message are intended for the exclusive use of the addressee(s) and may > contain confidential or privileged information. If you are not the intended > recipient, or the person responsible for delivering the e-mail to the > intended recipient, be advised you have received this message in error and > that any use, dissemination, forwarding, printing, or copying is strictly > prohibited. Please notify Archemix Corp. immediately at either (617) > 621-7700 or by return fax at (617) 621-9300 and destroy all copies of this > message and any attachments. > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315054 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4