Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default problem with lists

    I have the following code in test1.cfm with a struct that work just fine...

    <cfloop index="ind" from="1" to="#miQuery.recordcount#">
    <tr>
    <cfset cbname="cb_" & ind>
    <cfset refname="ref_" & ind>
    <cfset monto="mon_" & ind>
    <cfset fecha="fec_" & ind>
    <td width="6%"><input type="checkbox" name="cbs" value="#cbname#"></td>
    <td><div align="center"><input name="#refname#" type="text"
    value="#cb[ind].refMemb#"></div></td>
    <td><div align="center">
    <input name="#monto#" type="text" value="#cb[ind].montoP#">
    </div></td>
    <td><div align="center"><input name="#fecha#" type="text"
    value="#cb[ind].fechaP#"></div></td>
    </tr>
    </cfloop>

    And the action page is test2.cfm...

    <cfif isdefined("form.submit")>
    <cfparam name="form.cbs" default="">
    Los cambios fueron:
    <table width="80%" border="0">
    <tr>
    <td>Referencia</td>
    <td>Monto</td>
    <td>Fecha</td>
    </tr>

    <cfloop index="i" list="#form.cbs#">
    <cfoutput>
    <tr>
    <td>#form["ref_" & i]#</td>
    <td>#form["mon_" & i]#</td>
    <td>#form["fec_" & i]#</td>
    </tr>
    </cfoutput>
    </cfloop>
    </table>
    </cfif>

    but when it call to the data in the list of the loop it doesnt do anything and
    refer me to a 500 internal server error.
    Hope you guys can help me with that.

    LusanInc Guest

  2. Similar Questions and Discussions

    1. Form Lists Problem-Question
      Here is what I am trying to do with MX7and an Access db. I have a table of member data that includes their email address. (Table column = Email) ...
    2. Problem combing multiple lists into one
      I have three lists (m1,m2,m3) and I need to combine them into one list (m4): <cfset m1 = valuelist(search2.cat)> <cfset m2 =...
    3. Binding Lists Problem
      I have a problem when I bind a list's Items to a TextArea or to a Label. The binding doesn't work if I have more than one scenes. Can anybody tell...
    4. netTextResult with lists problem
      Hi!, I'm a student in holland and I'm curently creating a database with director but I've run into a small problem... I have written the next...
    5. lists, attaching behaviour dynamiclly, update lists
      Hello, I am trying to get these scripts to work correctly. What I am trying to do is: 1) Look into a folder called 'tank,' then when this is...
  3. #2

    Default problem with lists

    I have the following code in test1.cfm with a struct that work just fine...

    <cfloop index="ind" from="1" to="#miQuery.recordcount#">
    <tr>
    <cfset cbname="cb_" & ind>
    <cfset refname="ref_" & ind>
    <cfset monto="mon_" & ind>
    <cfset fecha="fec_" & ind>
    <td width="6%"><input type="checkbox" name="cbs" value="#cbname#"></td>
    <td><div align="center"><input name="#refname#" type="text"
    value="#cb[ind].refMemb#"></div></td>
    <td><div align="center">
    <input name="#monto#" type="text" value="#cb[ind].montoP#">
    </div></td>
    <td><div align="center"><input name="#fecha#" type="text"
    value="#cb[ind].fechaP#"></div></td>
    </tr>
    </cfloop>

    And the action page is test2.cfm...

    <cfif isdefined("form.submit")>
    <cfparam name="form.cbs" default="">
    Los cambios fueron:
    <table width="80%" border="0">
    <tr>
    <td>Referencia</td>
    <td>Monto</td>
    <td>Fecha</td>
    </tr>

    <cfloop index="i" list="#form.cbs#">
    <cfoutput>
    <tr>
    <td>#form["ref_" & i]#</td>
    <td>#form["mon_" & i]#</td>
    <td>#form["fec_" & i]#</td>
    </tr>
    </cfoutput>
    </cfloop>
    </table>
    </cfif>

    but when it call to the data in the list of the loop it doesnt do anything and
    refer me to a 500 internal server error.
    Hope you guys can help me with that.TextAnd the action page is test2.cfm...

    LusanInc Guest

  4. #3

    Default Re: problem with lists

    Hi Lusanlnc

    Sorry, not sure where you're getting the error - is is on the CFLOOP?
    Try something like the attached for the CFLOOP on test2.cfm

    HTH

    Zoe

    <cfloop index="i" list="#form.cbs#">
    <cfoutput>
    <tr>
    <td>#Evaluate('form.ref_#i#')#</td>
    <td>#Evaluate('form.mon_#i#')#</td>
    <td>#Evaluate('form.fec_#i#')#</td>
    </tr>
    </cfoutput>
    </cfloop>

    zoeski80 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139