One other thing that I noticed:
<input type="checkbox" name="select" value="checked">
Will give you several checkboxes with the same name.  You need to make 
them distinct in some way, maybe by adding either X or the List Element 
varibale to the end of the word select.

Hatton


Hatton Humphrey wrote:

> I've adjusted your code below.  You had two major problems with what 
> you were working with:
>
> 1. Placement of tags
>     There were several places where the order of the tags you were 
> using would have prevented propper execution.
>
> 2. List versus Query.
>     Your check for the end of "recordset" needed to be a listlen 
> rather than a recordcount.
>
> HTH
> Hatton
>
> <table wisth="100%" cellpadding="6" cellspacing="0" border="0" 
> align="center">
>     <tr class="wdirlinks">
>         <td colspan="2">
>             <cfif COOKIE.DisplaySelect GT 0>
>                 <cfoutput>
>                 <cfset x=1>
>                 <table width="100%" cellpadding="2" cellspacing="2" 
> border="0">
>                     <tr>
>                         <cfloop index="ListElement" 
> list="#COOKIE.DisplaySelect#" delimiters=",">
>                             <td class="wdirlinks"><input 
> type="checkbox" name="select" value="checked">#ListElement#</td>
>                             <cfif NOT x MOD 3></tr><cfif x NEQ 
> ListLen(COOKIE.DisplaySelect)><tr></cfif></cfif>
>                             <cfset x = x + 1>
>                         </cfloop>
>                 </cfoutput>
>                 </table>   
>             <cfelse>
>                 &nbsp;<b>None Selected</b>
>             </cfif>
>         </td>
>     </tr>
> </table>
>
>
>
> FlashGuy wrote:
>
>> 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
>> ---------------------------------------------------
>>
>>
>>
>>
>> ------------------------------------------------------------------------- 
>>
>> This email server is running an evaluation copy of the MailShield anti-
>> spam software. Please contact your email administrator if you have any
>> questions about this message. MailShield product info: 
>> www.mailshield.com
>>
>> -----------------------------------------------
>> To post, send email to [EMAIL PROTECTED]
>> To subscribe / unsubscribe: http://www.dfwcfug.org
>>
>>  
>>
>
>
>
> -------------------------------------------------------------------------
> This email server is running an evaluation copy of the MailShield anti-
> spam software. Please contact your email administrator if you have any
> questions about this message. MailShield product info: www.mailshield.com
>
> -----------------------------------------------
> To post, send email to [EMAIL PROTECTED]
> To subscribe / unsubscribe: http://www.dfwcfug.org
>



-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to