Here is an example for a dropdown list box.  Checkbox should follow easily 
enough.

<!--- VendorSelectBox.cfm --->
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<title>cfdiv Example</title>
</head>
<body>
<cfinvoke component="Vendor" method="getVendor" returnvariable="qVendors">
        <cfinvokeargument name="getVendor" value="SINGLE">
</cfinvoke>
<cfform action="Requisition.cfm">
        <cfselect name="VendorSelect" query="qVendors" value="Vendor_ID" 
display="Vendor_Name"></cfselect>
</cfform>

<h3> using a div</h3>
<cfdiv bind="url:VendorInfo.cfm?Vendor_ID={VendorSelect}" ID="theDiv"
        style="background-color:##CCffFF; color:red; height:350"/>
</body>
</html>


<cfcomponent displayname="Vendors" hint="Obtains all Vendor for the Purchasing 
Application" output="false">
<!--- 
TableName: dbo.VENDOR
 <autogenerated>
     This code was generated by CodeSmith.

     Date:    1/10/2008
     Time:    10:52 AM
     Version: 4.0.0.0

     Changes to this file may cause incorrect behavior and will be lost if
     the code is regenerated.
 </autogenerated>
--->

        <!--- VENDOR --->
        <cffunction access="public" name="getVendor" output="false" 
returntype="query" displayname="getVendors" hint="Returns Vendor List">
                <cfargument name="getType" default="ALL" type="String" 
required="yes">
                <cfargument name="Vendor_ID" default="0" type="Numeric" 
required="no">


                <cfswitch expression="#arguments.getType#">
                        <cfcase value = "SINGLE">
                                <cfstoredproc procedure="usp_VENDOR_Select" 
datasource="#application.datasource#" returncode="No"  >
                                        <cfprocparam dbvarname="Vendor_ID" 
type="In" cfsqltype="CF_SQL_INTEGER" value="#arguments.Vendor_ID#" />
                                        <cfprocresult name="qVendors">
                                </cfstoredproc>
                        </cfcase>
                        <cfdefaultcase>
                                <cfstoredproc procedure="usp_VENDOR_Select_All" 
datasource="#application.datasource#" returncode="No"  >
                                        <cfprocresult name="qVendors">
                                </cfstoredproc>
                        </cfdefaultcase>
                </cfswitch>
                <cfreturn qVendors>
        </cffunction>
</cfcomponent>


<cfinvoke component="Vendor" method="getVendor" returnvariable="qVendors">
        <cfinvokeargument name="getType" value="SINGLE">
        <cfinvokeargument name="id" value="#url.Vendor_ID#">
</cfinvoke>

        <table border=0 cellpadding=0 cellspacing=0 width="100%">

<cfoutput query="qVendors">

                <tr>
                        <td>
                        
                        
                <table cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <td class="button-TL-white"><img 
src="images/buttonTL.gif" height="2" width="11" alt="" /></td>
                        <td class="button-T-white"><img 
src="images/buttonT.gif" height="2" width="4" alt="" /></td>
                        <td class="button-TR-white"><img 
src="images/buttonTR.gif" height="2" width="13" alt="" /></td>
                    </tr>
                    <tr>
                        <td class="button-L-white"><img 
src="images/buttonL.gif"  border="0" height="16" width="11" alt="" /></td>
                        <td class="button-white"><a 
href="VendorEdit.cfm?Vendor_ID=#Vendor_ID#" id="lnkEdit" 
class="button_link">Vendor Name:</a></td>
                        <td class="button-R-white"><img 
src="images/buttonR.gif" border="0" height="16" width="13" alt="" /></td>
                    </tr>
                    <tr>
                        <td class="button-BL-white"><img 
src="images/buttonBL.gif" height="2" width="11" alt="" /></td>
                        <td class="button-B-white"><img 
src="images/buttonB.gif" height="2" width="4" alt="" /></td>
                        <td class="button-BR-white"><img 
src="images/buttonBR.gif" height="2" width="13" alt="" /></td>
                    </tr>
                </table>                        
                        
                        </td>                   
                        <td><strong>#Vendor_Name#</strong></td>         
                </tr>

                <tr>
                        <td>Account Number:</td>
                        <td>#Account_Number#</td>               
                </tr>

                <tr>
                        <td>User ID:</td>
                        <td>#User_ID#</td>              
                </tr>

                <tr>
                        <td>Password:</td>
                        <td>#Password#</td>             
                </tr>

                <tr>
                        <td>Comments:</td>
                        <td>#Comments#</td>             
                </tr>

                <tr>
                        <td>Rep:</td>
                        <td>#Rep#</td>          
                </tr>

                <tr>
                        <td>Phone:</td>
                        <td>#Phone#</td>                
                </tr>

                <tr>
                        <td>Fax:</td>
                        <td>#Fax#</td>          
                </tr>
                
                <tr>
                        <td>Email:</td>
                        <td>#Email#</td>                
                </tr>

</cfoutput>
</table>





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300642
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to