Hey Guys,

I'm stuck and have been trying to figure this out all morning.

Here is what I have...

<CFSTOREDPROC procedure="LookUpAgentLinks" datasource="Leads">
  <CFPROCPARAM type="IN" dbvarname="@EntityID" value="#agEntityID#"
  cfsqltype="CF_SQL_CHAR">
  <CFPROCPARAM type="IN" dbvarname="@BtnType" value="INSP"
  cfsqltype="CF_SQL_VARCHAR">
  <CFPROCRESULT name="InsPlans">
</CFSTOREDPROC>

<cfquery name="Fusion_Content" datasource="Leads">
SELECT ID, Content_Name, Non_HTM_Desc
FROM Fusion_Content
ORDER BY ID ASC
</cfquery>

<!--- Create List from Database --->
<cfset idlist = #Trim(valueList(InsPlans.BTNTYPE))#>

<--- Body HTML Form--->

<cfoutput query="Fusion_Content">
    <input type="checkbox" name="ins#Fusion_Content.ID#"
    handleEnter(this, event)" value="#Fusion_Content.ID#"
    <cfif listFind(idlist, Fusion_Content.ID)> checked="checked"</cfif>>
   <br>
</cfoutput>

What I am trying to do is repeat the checkbox for each entry in the
Fusion_Content Table and then have the checkbox pre selected depending if
the values in the Stored Procedure (InsPlan) match.

Basically I want the Check box to be pre selected if the user has already
chosen this in the past.   

I know the "idlist" is working but for some reason when I do the
"ListFind(idlist, Fusion_Content.ID)" it only has the last item selected.

For example if have a list like "10 ,20 ,90" only "90" is selected.

If the list was 20 ,30 ,60 ,70 then 70 is selected.

For some reason it's not selecting the others.

Hope this makes sense.

Thanks,
Neal Bailey
Internet Marketing Manager
UGA-Association Field Services
E-mail: [EMAIL PROTECTED]
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to