2 Replies Latest reply on Jun 18, 2006 11:04 AM by Newsgroup_User

    Horizontal Looper

    Level 7
      Can anyone tell me why I am getting a "Context validation error for tag
      cfloop." error for this:

      <cfset endrw=rottys_Index-1>
      <cfset HLooper1_numberColumns=2>
      <cfset numrows=2>
      <cfloop condition="numrows is not 0 and endrw less than
      rottys.RecordCount">
      <cfset startrw=endrw + 1>
      <cfset endrw=endrw + HLooper1_numberColumns>
      <tr align="center" valign="top">
      <cfloop query="rottys" startrow="#startrw#" endrow="#endrw#">
      <cfoutput>
      <td>
      <table width="160" border="0">
      <tr>
      <td valign="bottom"><img src="../admin/rotty/images/#rotty.image#"
      alt="Adopt Me!" name="Rott" width="200" height="" id="Rott" /></td>
      </tr>
      <tr>
      <td><div align="center"><a
      href="../foster/profile.cfm?pet_id=#.rottys.pet_id#">#rottys.name#</a></div></td>
      </tr>
      </table></td>
      </cfoutput>
      </cfloop>
      </tr>
      <cfset numrows = numrows - 1>
      </cfloop>

      Its says:
      The start tag must have a matching end tag. An explicit end tag can be
      provided by adding </cfloop>. If the body of the tag is empty you can use
      the shortcut <cfloop .../>.

      Refering to the second cfloop:
      <cfloop query="rottys" startrow="#startrw#" endrow="#endrw#">

      As far as I can tell it has both an opening and closing loop for each.

      Help


        • 1. Re: Horizontal Looper
          Level 7
          Nope, I don't see a problem, is this all the code? Is there a
          possibility of another <cfloop ...> before this code?

          Wally Kolcz wrote:
          > Can anyone tell me why I am getting a "Context validation error for tag
          > cfloop." error for this:
          >
          > <cfset endrw=rottys_Index-1>
          > <cfset HLooper1_numberColumns=2>
          > <cfset numrows=2>
          > <cfloop condition="numrows is not 0 and endrw less than
          > rottys.RecordCount">
          > <cfset startrw=endrw + 1>
          > <cfset endrw=endrw + HLooper1_numberColumns>
          > <tr align="center" valign="top">
          > <cfloop query="rottys" startrow="#startrw#" endrow="#endrw#">
          > <cfoutput>
          > <td>
          > <table width="160" border="0">
          > <tr>
          > <td valign="bottom"><img src="../admin/rotty/images/#rotty.image#"
          > alt="Adopt Me!" name="Rott" width="200" height="" id="Rott" /></td>
          > </tr>
          > <tr>
          > <td><div align="center"><a
          > href="../foster/profile.cfm?pet_id=#.rottys.pet_id#">#rottys.name#</a></div></td>
          > </tr>
          > </table></td>
          > </cfoutput>
          > </cfloop>
          > </tr>
          > <cfset numrows = numrows - 1>
          > </cfloop>
          >
          > Its says:
          > The start tag must have a matching end tag. An explicit end tag can be
          > provided by adding </cfloop>. If the body of the tag is empty you can use
          > the shortcut <cfloop .../>.
          >
          > Refering to the second cfloop:
          > <cfloop query="rottys" startrow="#startrw#" endrow="#endrw#">
          >
          > As far as I can tell it has both an opening and closing loop for each.
          >
          > Help
          >
          >
          • 2. Re: Horizontal Looper
            Level 7
            Nevermind, I got it to work.