Are you sure all the variables are correct?  Your query name is ListElement,
then you are using that as your list index, which would overwrite the query
results.  And you are testing cookie.displaySelect for being greater than 0,
then you are using it as your list?  The variables are confusing so it is
hard to see exactly what you are doing.

Assuming that the variables are correct, do you want the <table> tags
outside of your loop?  Each loop is creating a new table.

Dan

-----Original Message-----
From: FlashGuy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 25, 2002 5:46 AM
To: CF-Community
Subject: Display 3 column text *FOLLOWUP*


Hi,

It just occured to me that the examples I've been receiving might not work
with my application. The line I'm grabbing from the database and want to
display in 3 columns is a 
comma delimited line which could contain 5-100 names separated by a comma.

inetpub,program files, test,temp

I need to loop through that string. In my case, "#ListElement#" which would
contain the above line "inetpub,program files, test,temp"

Am I making sense?


Here is my code below. I still can't get it to display in 3 columns?

<cfquery name="ListElement" datasource="user-profiles" dbtype="ODBC">
        SELECT      strUsername,strGroup,strSelect
        FROM        profiles
        WHERE       strUsername = '#auth#'
</cfquery>

<table wisth="100%" cellpadding="6" cellspacing="0" border="0"
align="center">
<tr class="wdirlinks">
<td colspan="2">
<cfif COOKIE.DisplaySelect GT 0>
        <cfloop index="ListElement" list="#COOKIE.DisplaySelect#"
delimiters=",">
        <cfoutput>
        <table width="100%" cellpadding="2" cellspacing="2" border="0">
        <tr>
        <cfset x=1>
        <cfif NOT x MOD 3></tr><cfif x NEQ
#ListElement.RecordCount#><tr></cfif></cfif>
        <cfset x = x + 1>
        <td class="wdirlinks"><input type="checkbox" name="select"
value="checked">#ListElement#</td>
        </tr>
        </table>        
        </cfoutput>
        </cfloop>
<cfelse>
        &nbsp;<b>None Selected</b>
</cfif>
</td>
</tr>
</table>


---------------------------------------------------
Colonel Nathan R. Jessop
Commanding Officer
Marine Ground Forces
Guatanamo Bay, Cuba
---------------------------------------------------




______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to