unable to nest cfif tags

Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #1

    Default unable to nest cfif tags

    I keep getting this error message:

    "Context validation error for tag cfif.
    The start tag must have a matching end tag. ...."

    when I try to do this

    Code Sample

    <cfif getProjectHours.recordCount GTE rowIndex>
    <cfset startTijd = #TimeFormat(getProjectHours.startTijd[rowIndex],
    "HH:mm:ss")#>
    <cfif URL.rowId EQ getProjectHours.startTijd[rowIndex]>
    <cfif URL.action EQ "timing">
    #startTijd#
    <cfelse>
    <cfif URL.action EQ "edit">
    <input type="text" name="startTijd" value="#startTijd#" class="inputField">
    </cfif>
    </cfif>
    <cfelse>
    <a
    href="#CGI.SCRIPT_NAME#?projectId=#URL.projectId#& action=edit&#&rowId=#getProjec
    tHours.id[rowIndex]#" class="link">#startTijd#</a>
    </cfif>
    <cfelse>
    &nbsp;
    </cfif>


    afaics there are no cfif tags left without an /cfif tag.... Or am I wrong?
    Or is this a setting in the cf administrator that prohibits these constructs?
    Or is this not possible in coldfusion?

    Marc

    lingo_user Guest

  2. Similar Questions and Discussions

    1. How to treat template tags as comment tags?
      Hi all, I am using DW MX to edit templates for a FreeMarker application. The template tag fromat is like so: <ul> <#list birds as bird>...
    2. CFIF help
      I have an HTML that has a list of names pulled from a Database. In my HTML table my headers are Read, Write, Release, View For each employee that...
    3. cfif being ignored
      I wanted this to only execute if FORM.rp_image does not = defaultImg.gif but it seems to always run. I thought the syntax was okay but maybe not. ...
    4. Nest DataList in DataGrid
      I need to nest a datalist in a column of a datagrid. There are a hundred articles on doing this, but not one shows how to fire an ItemDataBound...
    5. Using ParseChildren attribute to load child tags - VS removes tags
      I am building a poll control, nested in the tag I have child tags to setup the poll options. Everything works fine, but when I edit a property in...
  3. #2

    Default Re: unable to nest cfif tags

    The code fragment you posted is syntatically correct and should work. Are you sure you don't have an extraneous <CFIF> or </CFIF> before or after this fragment?
    jdeline Guest

  4. #3

    Default Re: unable to nest cfif tags

    well I checked and re-checked and changed a lot. Now it's working so I can't
    exactly point to what it was that caused the problem but probably it was some
    tag - mismatch somewhere else...

    thanks for the help anyway!

    lingo_user 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