I wonder if your trim should be around each item as you build the list
i.e.

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

and I would also put a trim around the value you are comparing it to
i.e.

<cfif listFind(idlist, trim(Fusion_Content.ID))>

HTH

Michael Traher

-----Original Message-----
From: Bailey, Neal [mailto:[EMAIL PROTECTED]
Sent: 05 December 2003 16:11
To: CF-Talk
Subject: RE: ListFind(Problems)

Ok thanks,

But it works both ways. And I still have this issue... Can any one think
of
a better way to have dynamic checkboxes pre-selected? Maybe I need to
approach this ad a different angle.

Neal Bailey
Internet Marketing Manager
UGA-Association Field Services
E-mail:  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]

-----Original Message-----
From: Jerry Johnson [mailto:[EMAIL PROTECTED]
Sent: Friday, December 05, 2003 9:58 AM
To: CF-Talk
Subject: Re: ListFind(Problems)

I always write my checkbox selected as:

<input type="checkbox" CHECKED>

rather than the

<input type="checkbox" checked="checked">

as you have.

Jerry Johnson

>>> [EMAIL PROTECTED] 12/05/03 10:11AM >>>
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