URL Method for 3 tables?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #31
    The JavaScript should be something like:
    Code:
    var count = parseInt(document.getElementById('theValue').value) +1;
    The recordcount check should contain HTML code.

    Comment

    • bonneylake
      Contributor
      • Aug 2008
      • 769

      #32
      Originally posted by acoder
      The JavaScript should be something like:
      Code:
      var count = parseInt(document.getElementById('theValue').value) +1;
      The recordcount check should contain HTML code.
      Hey Acoder,

      Well i am sadly still having problems. For some reason when i fixed the ending div tag to be outside the cfoutput it now has the parts part of my table working (its below this part in another table), before it would not even display those fields as having nothing applied to them, but for some reason the table don't wanna look right for it. But anyway so are you saying to wrap the html in the cfif for example

      Code:
      <cfif serial.recordcount is 0>
      <table class="zpExpandedTable" id="modeltable"> 
      <th class="sectiontitletick" colspan="7">
      Serial Information #count# </th>
      <tr>
      <td id="paddingformultitop">Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>
      </td>
      <td>
      <select name="modelno_#count#">
      <option value="">Make A Selection</option>
      <cfloop query="models">
      <option value="#model#"<cfif #model# is #model_no#>selected</cfif>>#model#</option>
      </cfloop> 
      </select>
      </td>
      </tr>
      </table>
      </cfif>
      i been trying this an it doesn't seem to do anything to it. An i don't know if this helps but if i try to click on add serial it says object required.

      Thank you,
      Rach

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #33
        What I was suggesting was to put the HTML for the blank fields in the cfif, e.g.
        Code:
        <!--- code that displays in loop for serials and parts --->
        <!--- ... --->
        <!--- now if no serials, then display empty table --->
        <cfif serial.recordcount is 0>
        <table class="zpExpandedTable" id="modeltable">
        <th class="sectiontitletick" colspan="7">
        Serial Information 1 </th>
        <tr>
        <td id="paddingformultitop">Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>
        </td>
        <td>
        <select name="modelno_1">
        <option value="">Make A Selection</option>
        <cfloop query="models">
        <option value="#model#">#model#</option>
        </cfloop>
        </select>
        </td>
        </tr>
        </table>
        </cfif>

        Comment

        • bonneylake
          Contributor
          • Aug 2008
          • 769

          #34
          Originally posted by acoder
          What I was suggesting was to put the HTML for the blank fields in the cfif, e.g.
          Code:
          <!--- code that displays in loop for serials and parts --->
          <!--- ... --->
          <!--- now if no serials, then display empty table --->
          <cfif serial.recordcount is 0>
          <table class="zpExpandedTable" id="modeltable">
          <th class="sectiontitletick" colspan="7">
          Serial Information 1 </th>
          <tr>
          <td id="paddingformultitop">Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>
          </td>
          <td>
          <select name="modelno_1">
          <option value="">Make A Selection</option>
          <cfloop query="models">
          <option value="#model#">#model#</option>
          </cfloop>
          </select>
          </td>
          </tr>
          </table>
          </cfif>
          Hey Acoder,

          Hate to say it i am still confused. By looking at your example your implying to change modelno_#count# to modelno_1 an the thing is i still need the count there because it will have to be able to display previously entered records and also fields that they did not enter. an confused by also taking out the selected since i need the selected to show what the user selected as there option. But here is what i have. Now the add serial works correctly with no problems :). But here is what i have, bolded what is new.

          Code:
          <div id="dynamicInput"> 
               <!--- All Ticket Information Appears Here--->
               
               
              <!--- Shows what was previously entered for Model No, Product Type, and Type of Hardware Failure  --->
          <cfset count = 0>
          <input type="hidden" value="#count#" name="theValue" id="theValue" />
          <cfoutput query="serial">
          <cfset model_no = #model_no#>
          <cfset product_type = #product_type#>
          <cfset type_hardware_failure = #type_hardware_failure#>
          <cfset software_hardware = #software_hardware#>
          <cfset resolution_verified_by = #resolution_verified_by#>
          <cfset dept_responsibility = #dept_responsibility#>
          <cfset count = count + 1>
          <div id="dynamic#count#Input">
          [B]<cfif serial.recordcount is 0>[/B]
          <table class="zpExpandedTable" id="modeltable"> 
          <th class="sectiontitletick" colspan="7">
          Serial Information #count# </th>
          <tr>
          <td id="paddingformultitop">Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>
          </td>
          <td>
          <select name="modelno_#count#">
          <option value="">Make A Selection</option>
          <cfloop query="models">
          <option value="#model#"<cfif #model# is #model_no#>selected</cfif>>#model#</option>
          </cfloop> 
          </select>
          
          </td>
          <td>
          &nbsp;&nbsp;&nbsp;&nbsp;Product Type:
          </td>
          <td>
          <select name="producttype_#count#">
          <option value="" selected>No Choice</option>
          <cfloop query="getProdType">
          <option value="#pk_productType#"<cfif #pk_productType# is #product_type#>selected</cfif>>#pk_productType#</option> 
          </cfloop>
          </select>
          </td>
          <td class="red'">
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:
          </td>
          <td>
          <select name="hardwarefailure_#count#">
          <option value="" selected>Make A Selection</option>
          <cfloop query="getHardwareFail">
          <option value="#pk_hardwareFailure#"<cfif #pk_hardwareFailure# is #type_hardware_failure#>selected</cfif>>#pk_hardwareFailure#</option>
          </cfloop>
          </select>
          </td>
          </tr>
          <table>
           
          <!--- Shows what was previously entered for Serial Number and Software/Hardware  --->
          <table class="zpExpandedTable" id="modeltable">
          <tr>
          <td id="paddingformultitop">
          Serial Number:&nbsp;&nbsp;
          <input type="text" name="serialnum_#count#" value="#pka_serialNo#">
          &nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;
          <select name="softhardware_#count#">
          <option value="" selected>No Choice</option>
          <cfloop query="getSoftHard">
          <option value="#pk_softwareHardware#"<cfif #pk_softwareHardware# is #software_hardware#>selected</cfif>>#pk_softwareHardware#</option>
          </cfloop>
          </select>
          </td>
          </tr>
          </table>
          
          <!--- Shows what was previously entered for Description ---> 
          
          <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0">
          <tr>
          <td id="paddingformutli">
          Description:&nbsp;&nbsp;
          </td>
          <td class="descriptionmoveinmulti">
          ( You may enter up to 500 characters. )
          <br>
          <cfloop query="description"><textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="thedescription_#count#">#description#</textarea></cfloop> 
          </td>
          </tr>
          </table>
           
          <!---Shows what was previously entered for Resolution  --->
          
          <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
          <tr>
          <td id="paddingformutli">
          Resolution:&nbsp;&nbsp;
          </td>
          <td class="resolutionmoveinmulti">
          ( You may enter up to 500 characters. )
          <br>
          <textarea  maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="resolution_#count#">#resolution#</textarea>
          </td>
          </tr>
          </table>
           
          <!--- Shows what was previously entered for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
          
          <table class="zpExpandedTable" id="resoldatetab" cellpadding="1" cellspacing="0">
          <tr>
          <td id="paddingformultitop">
          Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
          </td>
          <td>
          <input type="text" name="resdate_#count#" value="#resolution_date#">&nbsp;&nbsp;
           
          &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
          <!---<input type="checkbox" name="currentdateresol_' + count + '" onClick=resdate_" + count + ".value=fill_date()>--->
          
          </td>
          <td>
          Resolution Verified as effective by:&nbsp;&nbsp;
          </td>
          <td>
          <select name="resvertified_#count#">
          <option value="" selected>Make A Selection</option>
          <cfloop query="gettech">
          <option value="#fname# #lname#"<cfif "#fname# #lname#" is #resolution_verified_by#>selected</cfif>>#fname# #lname#</option>
          </cfloop>
          </select>
          </td>
          </tr>
          </table>
          <!--- Shows what was previously entered for Vertification Date, Current Date (for vertification date)   --->
          <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
          <tr>
          <td id="paddingformultitop">
          Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
          </td>
          <td class="vertificationmoveinmulti">
          <input type="text" name="vertifidate_#count#" value="#verification_date#">&nbsp;&nbsp;
          &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
          <!---<input type="checkbox" name="currentdatevert_' + count + '" onClick=vertifidate_" + count + ".value=fill_date()>--->
          </td>
          </tr>
          </table>
           
          <!--- Shows what was previously entered for Dept/Vendor Responsibility  --->
          <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
          <tr>
          <td class="red" id="paddingformultitop">
          Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <select name="deptvendor_#count#">
          <option value="" selected>Make A Selection</option>
          <cfloop query="getDeptVendor">
          <option value="#pk_deptVendor#"<cfif #pk_deptVendor# is #dept_responsibility#>selected</cfif>>#pk_deptVendor#</option>
          </cfloop>
          </select>
          </td>
          </tr>
          </table>
           
          <!--- Shows what was previously entered for RMA Data Only  --->
          <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
          <tr>
          <td id="paddingformultitop">
          RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;
          </td>
          <td class="rmanmoveinmulti">
          ( You may enter up to 500 characters. )
          <br/>
          <textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="rma_#count#" >#rma_data#</textarea>
          </td>
          </tr>
          </table>
          <!---<input type="hidden" name="serialcount" value="#count#">--->
           
          <!--- Adds Delete to every ticket  --->
          <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
          <tr>
          <td>
          <!---<input type="button" class="removeticket" value="Remove Serial &quot;'+count +'&quot;" onclick=\"removeElement(\'"+divIdName+"\')\">--->
          <input type="button" class="removeticket" value="Remove Serial #count#" onclick="removeElement('dynamic#count#Input')">
          </td>
          </tr>
          </table>
          [B]</cfif>[/B]
          </div>
          </cfoutput>
          </div>
               <input type="button" class="addticket" value="Add Serial" onClick="addInput('dynamicInput');" >
          Thank you,
          Rach

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #35
            I didn't mean to replace what you currently had, but to add to it.

            However, before going any further, can you confirm that you definitely need to have something displayed for serials and parts even if there are none for a particular ticket?

            Comment

            • bonneylake
              Contributor
              • Aug 2008
              • 769

              #36
              Originally posted by acoder
              I didn't mean to replace what you currently had, but to add to it.

              However, before going any further, can you confirm that you definitely need to have something displayed for serials and parts even if there are none for a particular ticket?
              Hey Acoder,

              its ok about the replacing just making sure i can still keep it in there :).

              But yes i definitely have to have something display there for serial an parts even if there was nothing applied to it to begin with. Need it because they might need to later add on to the form and if the field is not available to type in then they can't add on to it.

              Thank you,
              Rach

              Comment

              • acoder
                Recognized Expert MVP
                • Nov 2006
                • 16032

                #37
                In that case, you need to keep what you had before (without the cfif) and then copy and add after <cfloop query="serial"> the <cfif recordcount ...> code. What this would do is show the previous serials if any and if none, it would display an empty table for the user to fill.

                Comment

                • bonneylake
                  Contributor
                  • Aug 2008
                  • 769

                  #38
                  Originally posted by acoder
                  In that case, you need to keep what you had before (without the cfif) and then copy and add after <cfloop query="serial"> the <cfif recordcount ...> code. What this would do is show the previous serials if any and if none, it would display an empty table for the user to fill.

                  Hey Acoder

                  so your saying to do to every field this

                  Code:
                  <select name="modelno_#count#">
                  <option value="">Make A Selection</option>
                  <cfloop query="models"><cfif serial.recordcount is 0>
                  <option value="#model#"<cfif #model# is #model_no#>selected</cfif>>#model#</option>
                  </cfif>
                  </cfloop> 
                  </select>
                  or something else? but here is everything inside the div, haven't added the <cfif serial.recordco unt is 0> to them all yet

                  Code:
                   <div id="dynamicInput"> 
                       <!--- All Ticket Information Appears Here--->
                       
                       
                      <!--- Shows what was previously entered for Model No, Product Type, and Type of Hardware Failure  --->
                  <cfset count = 0>
                  <!---<cfif serial.recordcount is 0></cfif>--->
                  <cfoutput query="serial">
                  <cfset model_no = #model_no#>
                  <cfset product_type = #product_type#>
                  <cfset type_hardware_failure = #type_hardware_failure#>
                  <cfset software_hardware = #software_hardware#>
                  <cfset resolution_verified_by = #resolution_verified_by#>
                  <cfset dept_responsibility = #dept_responsibility#>
                  <cfset count = count + 1>
                  <div id="dynamic#count#Input">
                  <table class="zpExpandedTable" id="modeltable"> 
                  <th class="sectiontitletick" colspan="7">
                  Serial Information #count# </th>
                  <tr>
                  <td id="paddingformultitop">Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>
                  </td>
                  <td>
                  <select name="modelno_#count#">
                  <option value="">Make A Selection</option>
                  <cfloop query="models">
                  <option value="#model#"<cfif #model# is #model_no#>selected</cfif>>#model#</option>
                  </cfloop> 
                  </select>
                  
                  </td>
                  <td>
                  &nbsp;&nbsp;&nbsp;&nbsp;Product Type:
                  </td>
                  <td>
                  <select name="producttype_#count#">
                  <option value="" selected>No Choice</option>
                  <cfloop query="getProdType">
                  <option value="#pk_productType#"<cfif #pk_productType# is #product_type#>selected</cfif>>#pk_productType#</option> 
                  </cfloop>
                  </select>
                  </td>
                  <td class="red'">
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:
                  </td>
                  <td>
                  <select name="hardwarefailure_#count#">
                  <option value="" selected>Make A Selection</option>
                  <cfloop query="getHardwareFail">
                  <option value="#pk_hardwareFailure#"<cfif #pk_hardwareFailure# is #type_hardware_failure#>selected</cfif>>#pk_hardwareFailure#</option>
                  </cfloop>
                  </select>
                  </td>
                  </tr>
                  <table>
                   
                  <!--- Shows what was previously entered for Serial Number and Software/Hardware  --->
                  <table class="zpExpandedTable" id="modeltable">
                  <tr>
                  <td id="paddingformultitop">
                  Serial Number:&nbsp;&nbsp;
                  <input type="text" name="serialnum_#count#" value="#pka_serialNo#">
                  &nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;
                  <select name="softhardware_#count#">
                  <option value="" selected>No Choice</option>
                  <cfloop query="getSoftHard">
                  <option value="#pk_softwareHardware#"<cfif #pk_softwareHardware# is #software_hardware#>selected</cfif>>#pk_softwareHardware#</option>
                  </cfloop>
                  </select>
                  </td>
                  </tr>
                  </table>
                  
                  <!--- Shows what was previously entered for Description ---> 
                  
                  <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0">
                  <tr>
                  <td id="paddingformutli">
                  Description:&nbsp;&nbsp;
                  </td>
                  <td class="descriptionmoveinmulti">
                  ( You may enter up to 500 characters. )
                  <br>
                  <cfloop query="description"><textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="thedescription_#count#">#description#</textarea></cfloop> 
                  </td>
                  </tr>
                  </table>
                   
                  <!---Shows what was previously entered for Resolution  --->
                  
                  <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
                  <tr>
                  <td id="paddingformutli">
                  Resolution:&nbsp;&nbsp;
                  </td>
                  <td class="resolutionmoveinmulti">
                  ( You may enter up to 500 characters. )
                  <br>
                  <textarea  maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="resolution_#count#">#resolution#</textarea>
                  </td>
                  </tr>
                  </table>
                   
                  <!--- Shows what was previously entered for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
                  
                  <table class="zpExpandedTable" id="resoldatetab" cellpadding="1" cellspacing="0">
                  <tr>
                  <td id="paddingformultitop">
                  Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
                  </td>
                  <td>
                  <input type="text" name="resdate_#count#" value="#resolution_date#">&nbsp;&nbsp;
                   
                  &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
                  <!---<input type="checkbox" name="currentdateresol_' + count + '" onClick=resdate_" + count + ".value=fill_date()>--->
                  
                  </td>
                  <td>
                  Resolution Verified as effective by:&nbsp;&nbsp;
                  </td>
                  <td>
                  <select name="resvertified_#count#">
                  <option value="" selected>Make A Selection</option>
                  <cfloop query="gettech">
                  <option value="#fname# #lname#"<cfif "#fname# #lname#" is #resolution_verified_by#>selected</cfif>>#fname# #lname#</option>
                  </cfloop>
                  </select>
                  </td>
                  </tr>
                  </table>
                  <!--- Shows what was previously entered for Vertification Date, Current Date (for vertification date)   --->
                  <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
                  <tr>
                  <td id="paddingformultitop">
                  Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
                  </td>
                  <td class="vertificationmoveinmulti">
                  <input type="text" name="vertifidate_#count#" value="#verification_date#">&nbsp;&nbsp;
                  &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
                  <!---<input type="checkbox" name="currentdatevert_' + count + '" onClick=vertifidate_" + count + ".value=fill_date()>--->
                  </td>
                  </tr>
                  </table>
                   
                  <!--- Shows what was previously entered for Dept/Vendor Responsibility  --->
                  <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
                  <tr>
                  <td class="red" id="paddingformultitop">
                  Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  <select name="deptvendor_#count#">
                  <option value="" selected>Make A Selection</option>
                  <cfloop query="getDeptVendor">
                  <option value="#pk_deptVendor#"<cfif #pk_deptVendor# is #dept_responsibility#>selected</cfif>>#pk_deptVendor#</option>
                  </cfloop>
                  </select>
                  </td>
                  </tr>
                  </table>
                   
                  <!--- Shows what was previously entered for RMA Data Only  --->
                  <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
                  <tr>
                  <td id="paddingformultitop">
                  RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;
                  </td>
                  <td class="rmanmoveinmulti">
                  ( You may enter up to 500 characters. )
                  <br/>
                  <textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="rma_#count#" >#rma_data#</textarea>
                  </td>
                  </tr>
                  </table>
                  <!---<input type="hidden" name="serialcount" value="#count#">--->
                   
                  <!--- Adds Delete to every ticket  --->
                  <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
                  <tr>
                  <td>
                  <!---<input type="button" class="removeticket" value="Remove Serial &quot;'+count +'&quot;" onclick=\"removeElement(\'"+divIdName+"\')\">--->
                  <input type="button" class="removeticket" value="Remove Serial #count#" onclick="removeElement('dynamic#count#Input')">
                  </td>
                  </tr>
                  </table>
                  </div>
                  </cfoutput>
                  <input type="hidden" value="<cfoutput>#count#</cfoutput>" name="theValue" id="theValue" />
                  </div>
                       <input type="button" class="addticket" value="Add Serial" onClick="addInput('dynamicInput');" >
                  Thank you,
                  Rach

                  Comment

                  • acoder
                    Recognized Expert MVP
                    • Nov 2006
                    • 16032

                    #39
                    No, just one recordcount check and all tables/fields included, but blank and nothing selected.

                    Comment

                    • bonneylake
                      Contributor
                      • Aug 2008
                      • 769

                      #40
                      Originally posted by acoder
                      No, just one recordcount check and all tables/fields included, but blank and nothing selected.
                      Hey Acoder,

                      I tried this but i know this aint right i guess i am just confused on where i should put it. bolded where i put them

                      Code:
                      <!--- Ticket Information 
                             This display the ticket Information--->
                          
                      <!---<input type="hidden" value="0" id="theValue" />--->
                          <div id="dynamicInput"> 
                           <!--- All Ticket Information Appears Here--->
                           
                      
                          <!--- Shows what was previously entered for Model No, Product Type, and Type of Hardware Failure  --->
                      <cfset count = 0>
                      <cfoutput query="serial">
                      <cfset model_no = #model_no#>
                      <cfset product_type = #product_type#>
                      <cfset type_hardware_failure = #type_hardware_failure#>
                      <cfset software_hardware = #software_hardware#>
                      <cfset resolution_verified_by = #resolution_verified_by#>
                      <cfset dept_responsibility = #dept_responsibility#>
                      <cfset count = count + 1>
                      <div id="dynamic#count#Input">
                         [B]<cfif serial.recordcount is 0>  [/B]
                      <table class="zpExpandedTable" id="modeltable"> 
                      <th class="sectiontitletick" colspan="7">
                      Serial Information #count# </th>
                      <tr>
                      <td id="paddingformultitop">Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>
                      </td>
                      <td>
                      <select name="modelno_#count#">
                      <option value="">Make A Selection</option>
                      <cfloop query="models">
                      <option value="#model#"<cfif #model# is #model_no#>selected</cfif>>#model#</option>
                      
                      </cfloop> 
                      </select>
                      
                      </td>
                      <td>
                      &nbsp;&nbsp;&nbsp;&nbsp;Product Type:
                      </td>
                      <td>
                      <select name="producttype_#count#">
                      <option value="" selected>No Choice</option>
                      <cfloop query="getProdType">
                      <option value="#pk_productType#"<cfif #pk_productType# is #product_type#>selected</cfif>>#pk_productType#</option> 
                      </cfloop>
                      </select>
                      </td>
                      <td class="red'">
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:
                      </td>
                      <td>
                      <select name="hardwarefailure_#count#">
                      <option value="" selected>Make A Selection</option>
                      <cfloop query="getHardwareFail">
                      <option value="#pk_hardwareFailure#"<cfif #pk_hardwareFailure# is #type_hardware_failure#>selected</cfif>>#pk_hardwareFailure#</option>
                      </cfloop>
                      </select>
                      </td>
                      </tr>
                      <table>
                       
                      <!--- Shows what was previously entered for Serial Number and Software/Hardware  --->
                      <table class="zpExpandedTable" id="modeltable">
                      <tr>
                      <td id="paddingformultitop">
                      Serial Number:&nbsp;&nbsp;
                      <input type="text" name="serialnum_#count#" value="#pka_serialNo#">
                      &nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;
                      <select name="softhardware_#count#">
                      <option value="" selected>No Choice</option>
                      <cfloop query="getSoftHard">
                      <option value="#pk_softwareHardware#"<cfif #pk_softwareHardware# is #software_hardware#>selected</cfif>>#pk_softwareHardware#</option>
                      </cfloop>
                      </select>
                      </td>
                      </tr>
                      </table>
                      
                      <!--- Shows what was previously entered for Description ---> 
                      
                      <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0">
                      <tr>
                      <td id="paddingformutli">
                      Description:&nbsp;&nbsp;
                      </td>
                      <td class="descriptionmoveinmulti">
                      ( You may enter up to 500 characters. )
                      <br>
                      <cfloop query="description"><textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="thedescription_#count#">#description#</textarea></cfloop> 
                      </td>
                      </tr>
                      </table>
                       
                      <!---Shows what was previously entered for Resolution  --->
                      
                      <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
                      <tr>
                      <td id="paddingformutli">
                      Resolution:&nbsp;&nbsp;
                      </td>
                      <td class="resolutionmoveinmulti">
                      ( You may enter up to 500 characters. )
                      <br>
                      <textarea  maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="resolution_#count#">#resolution#</textarea>
                      </td>
                      </tr>
                      </table>
                       
                      <!--- Shows what was previously entered for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
                      
                      <table class="zpExpandedTable" id="resoldatetab" cellpadding="1" cellspacing="0">
                      <tr>
                      <td id="paddingformultitop">
                      Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
                      </td>
                      <td>
                      <input type="text" name="resdate_#count#" value="#resolution_date#">&nbsp;&nbsp;
                       
                      &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
                      <!---<input type="checkbox" name="currentdateresol_' + count + '" onClick=resdate_" + count + ".value=fill_date()>--->
                      
                      </td>
                      <td>
                      Resolution Verified as effective by:&nbsp;&nbsp;
                      </td>
                      <td>
                      <select name="resvertified_#count#">
                      <option value="" selected>Make A Selection</option>
                      <cfloop query="gettech">
                      <option value="#fname# #lname#"<cfif "#fname# #lname#" is #resolution_verified_by#>selected</cfif>>#fname# #lname#</option>
                      </cfloop>
                      </select>
                      </td>
                      </tr>
                      </table>
                      <!--- Shows what was previously entered for Vertification Date, Current Date (for vertification date)   --->
                      <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
                      <tr>
                      <td id="paddingformultitop">
                      Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
                      </td>
                      <td class="vertificationmoveinmulti">
                      <input type="text" name="vertifidate_#count#" value="#verification_date#">&nbsp;&nbsp;
                      &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
                      <!---<input type="checkbox" name="currentdatevert_' + count + '" onClick=vertifidate_" + count + ".value=fill_date()>--->
                      </td>
                      </tr>
                      </table>
                       
                      <!--- Shows what was previously entered for Dept/Vendor Responsibility  --->
                      <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
                      <tr>
                      <td class="red" id="paddingformultitop">
                      Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                      <select name="deptvendor_#count#">
                      <option value="" selected>Make A Selection</option>
                      <cfloop query="getDeptVendor">
                      <option value="#pk_deptVendor#"<cfif #pk_deptVendor# is #dept_responsibility#>selected</cfif>>#pk_deptVendor#</option>
                      </cfloop>
                      </select>
                      </td>
                      </tr>
                      </table>
                       
                      <!--- Shows what was previously entered for RMA Data Only  --->
                      <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
                      <tr>
                      <td id="paddingformultitop">
                      RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;
                      </td>
                      <td class="rmanmoveinmulti">
                      ( You may enter up to 500 characters. )
                      <br/>
                      <textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="rma_#count#" >#rma_data#</textarea>
                      </td>
                      </tr>
                      </table>
                      <!---<input type="hidden" name="serialcount" value="#count#">--->
                       
                      <!--- Adds Delete to every ticket  --->
                      <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
                      <tr>
                      <td>
                      <!---<input type="button" class="removeticket" value="Remove Serial &quot;'+count +'&quot;" onclick=\"removeElement(\'"+divIdName+"\')\">--->
                      <input type="button" class="removeticket" value="Remove Serial #count#" onclick="removeElement('dynamic#count#Input')">
                      </td>
                      </tr>
                      </table>
                      [B]</cfif>[/B]
                      </div>
                      </cfoutput>
                      <input type="hidden" value="<cfoutput>#count#</cfoutput>" name="theValue" id="theValue" />
                      
                      </div>
                           <input type="button" class="addticket" value="Add Serial" onClick="addInput('dynamicInput');" >
                      Thank you,
                      Rach

                      Comment

                      • acoder
                        Recognized Expert MVP
                        • Nov 2006
                        • 16032

                        #41
                        No, remove the cfif around the code there and do something like:
                        Code:
                        <!--- previous code without cfif then ...--->
                        <cfif serial.recordcount is 0>
                        <!--- display empty table --->
                        </cfif>

                        Comment

                        • bonneylake
                          Contributor
                          • Aug 2008
                          • 769

                          #42
                          Originally posted by acoder
                          No, remove the cfif around the code there and do something like:
                          Code:
                          <!--- previous code without cfif then ...--->
                          <cfif serial.recordcount is 0>
                          <!--- display empty table --->
                          </cfif>
                          Hey Acoder,

                          did that. Do i need to put inbetween the cfif a copy of everything above it except make the fields not have a value? here is what i have. bolded where i added it.

                          Code:
                          <div id="dynamicInput"> 
                               <!--- All Ticket Information Appears Here--->
                               
                          
                              <!--- Shows what was previously entered for Model No, Product Type, and Type of Hardware Failure  --->
                          <cfset count = 0>
                          <!---<cfif serial.recordcount is 0>--->
                          <cfoutput query="serial">
                          <cfset model_no = #model_no#>
                          <cfset product_type = #product_type#>
                          <cfset type_hardware_failure = #type_hardware_failure#>
                          <cfset software_hardware = #software_hardware#>
                          <cfset resolution_verified_by = #resolution_verified_by#>
                          <cfset dept_responsibility = #dept_responsibility#>
                          <cfset count = count + 1>
                          <div id="dynamic#count#Input">
                          <table class="zpExpandedTable" id="modeltable"> 
                          <th class="sectiontitletick" colspan="7">
                          Serial Information #count# </th>
                          <tr>
                          <td id="paddingformultitop">Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>
                          </td>
                          <td>
                          <select name="modelno_#count#">
                          <option value="">Make A Selection</option>
                          <cfloop query="models">
                          <option value="#model#"<cfif #model# is #model_no#>selected</cfif>>#model#</option>
                          
                          </cfloop> 
                          </select>
                          
                          </td>
                          <td>
                          &nbsp;&nbsp;&nbsp;&nbsp;Product Type:
                          </td>
                          <td>
                          <select name="producttype_#count#">
                          <option value="" selected>No Choice</option>
                          <cfloop query="getProdType">
                          <option value="#pk_productType#"<cfif #pk_productType# is #product_type#>selected</cfif>>#pk_productType#</option> 
                          </cfloop>
                          </select>
                          </td>
                          <td class="red'">
                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:
                          </td>
                          <td>
                          <select name="hardwarefailure_#count#">
                          <option value="" selected>Make A Selection</option>
                          <cfloop query="getHardwareFail">
                          <option value="#pk_hardwareFailure#"<cfif #pk_hardwareFailure# is #type_hardware_failure#>selected</cfif>>#pk_hardwareFailure#</option>
                          </cfloop>
                          </select>
                          </td>
                          </tr>
                          <table>
                           
                          <!--- Shows what was previously entered for Serial Number and Software/Hardware  --->
                          <table class="zpExpandedTable" id="modeltable">
                          <tr>
                          <td id="paddingformultitop">
                          Serial Number:&nbsp;&nbsp;
                          <input type="text" name="serialnum_#count#" value="#pka_serialNo#">
                          &nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;
                          <select name="softhardware_#count#">
                          <option value="" selected>No Choice</option>
                          <cfloop query="getSoftHard">
                          <option value="#pk_softwareHardware#"<cfif #pk_softwareHardware# is #software_hardware#>selected</cfif>>#pk_softwareHardware#</option>
                          </cfloop>
                          </select>
                          </td>
                          </tr>
                          </table>
                          
                          <!--- Shows what was previously entered for Description ---> 
                          
                          <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0">
                          <tr>
                          <td id="paddingformutli">
                          Description:&nbsp;&nbsp;
                          </td>
                          <td class="descriptionmoveinmulti">
                          ( You may enter up to 500 characters. )
                          <br>
                          <cfloop query="description"><textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="thedescription_#count#">#description#</textarea></cfloop> 
                          </td>
                          </tr>
                          </table>
                           
                          <!---Shows what was previously entered for Resolution  --->
                          
                          <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
                          <tr>
                          <td id="paddingformutli">
                          Resolution:&nbsp;&nbsp;
                          </td>
                          <td class="resolutionmoveinmulti">
                          ( You may enter up to 500 characters. )
                          <br>
                          <textarea  maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="resolution_#count#">#resolution#</textarea>
                          </td>
                          </tr>
                          </table>
                           
                          <!--- Shows what was previously entered for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
                          
                          <table class="zpExpandedTable" id="resoldatetab" cellpadding="1" cellspacing="0">
                          <tr>
                          <td id="paddingformultitop">
                          Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
                          </td>
                          <td>
                          <input type="text" name="resdate_#count#" value="#resolution_date#">&nbsp;&nbsp;
                           
                          &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
                          <!---<input type="checkbox" name="currentdateresol_' + count + '" onClick=resdate_" + count + ".value=fill_date()>--->
                          
                          </td>
                          <td>
                          Resolution Verified as effective by:&nbsp;&nbsp;
                          </td>
                          <td>
                          <select name="resvertified_#count#">
                          <option value="" selected>Make A Selection</option>
                          <cfloop query="gettech">
                          <option value="#fname# #lname#"<cfif "#fname# #lname#" is #resolution_verified_by#>selected</cfif>>#fname# #lname#</option>
                          </cfloop>
                          </select>
                          </td>
                          </tr>
                          </table>
                          <!--- Shows what was previously entered for Vertification Date, Current Date (for vertification date)   --->
                          <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
                          <tr>
                          <td id="paddingformultitop">
                          Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
                          </td>
                          <td class="vertificationmoveinmulti">
                          <input type="text" name="vertifidate_#count#" value="#verification_date#">&nbsp;&nbsp;
                          &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
                          <!---<input type="checkbox" name="currentdatevert_' + count + '" onClick=vertifidate_" + count + ".value=fill_date()>--->
                          </td>
                          </tr>
                          </table>
                           
                          <!--- Shows what was previously entered for Dept/Vendor Responsibility  --->
                          <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
                          <tr>
                          <td class="red" id="paddingformultitop">
                          Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                          <select name="deptvendor_#count#">
                          <option value="" selected>Make A Selection</option>
                          <cfloop query="getDeptVendor">
                          <option value="#pk_deptVendor#"<cfif #pk_deptVendor# is #dept_responsibility#>selected</cfif>>#pk_deptVendor#</option>
                          </cfloop>
                          </select>
                          </td>
                          </tr>
                          </table>
                           
                          <!--- Shows what was previously entered for RMA Data Only  --->
                          <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
                          <tr>
                          <td id="paddingformultitop">
                          RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;
                          </td>
                          <td class="rmanmoveinmulti">
                          ( You may enter up to 500 characters. )
                          <br/>
                          <textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="rma_#count#" >#rma_data#</textarea>
                          </td>
                          </tr>
                          </table>
                          <!---<input type="hidden" name="serialcount" value="#count#">--->
                           
                          <!--- Adds Delete to every ticket  --->
                          <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
                          <tr>
                          <td>
                          <!---<input type="button" class="removeticket" value="Remove Serial &quot;'+count +'&quot;" onclick=\"removeElement(\'"+divIdName+"\')\">--->
                          <input type="button" class="removeticket" value="Remove Serial #count#" onclick="removeElement('dynamic#count#Input')">
                          </td>
                          </tr>
                          </table>
                          </div>
                          </cfoutput>
                          <input type="hidden" value="<cfoutput>#count#</cfoutput>" name="theValue" id="theValue" />
                          [B]<cfif serial.recordcount is 0>  
                          </cfif>[/B]
                          </div>
                               <input type="button" class="addticket" value="Add Serial" onClick="addInput('dynamicInput');" >
                          Thank you,
                          Rach

                          Comment

                          • acoder
                            Recognized Expert MVP
                            • Nov 2006
                            • 16032

                            #43
                            Yes, now add the same code within the cfif. Of course, you could make things easier by putting it in a separate file and including using cfinclude to reduce redundancy or use a custom tag.

                            Comment

                            • bonneylake
                              Contributor
                              • Aug 2008
                              • 769

                              #44
                              Originally posted by acoder
                              Yes, now add the same code within the cfif. Of course, you could make things easier by putting it in a separate file and including using cfinclude to reduce redundancy or use a custom tag.
                              Hey Acoder,

                              Yeah i might do an include when its all done i got 1136 lines of code. If i could move the javascript into its own file it would help a lot but when i tried it ran into problems. But anyway here is what i did but still getting the same thing. heres everything between cfif

                              Code:
                              <cfif serial.recordcount is 0>  
                              <cfset count = 0>
                              <!---<cfif serial.recordcount is 0>--->
                              <cfoutput query="serial">
                              <cfset model_no = #model_no#>
                              <cfset product_type = #product_type#>
                              <cfset type_hardware_failure = #type_hardware_failure#>
                              <cfset software_hardware = #software_hardware#>
                              <cfset resolution_verified_by = #resolution_verified_by#>
                              <cfset dept_responsibility = #dept_responsibility#>
                              <cfset count = count + 1>
                              <div id="dynamic#count#Input">
                              <table class="zpExpandedTable" id="modeltable"> 
                              <th class="sectiontitletick" colspan="7">
                              Serial Information #count# </th>
                              <tr>
                              <td id="paddingformultitop">Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>
                              </td>
                              <td>
                              <select name="modelno_#count#">
                              <option value="">Make A Selection</option>
                              <cfloop query="models">
                              <option value="#model#"<cfif #model# is #model_no#>selected</cfif>>#model#</option>
                              
                              </cfloop> 
                              </select>
                              
                              </td>
                              <td>
                              &nbsp;&nbsp;&nbsp;&nbsp;Product Type:
                              </td>
                              <td>
                              <select name="producttype_#count#">
                              <option value="" selected>No Choice</option>
                              <cfloop query="getProdType">
                              <option value="#pk_productType#"<cfif #pk_productType# is #product_type#>selected</cfif>>#pk_productType#</option> 
                              </cfloop>
                              </select>
                              </td>
                              <td class="red'">
                              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:
                              </td>
                              <td>
                              <select name="hardwarefailure_#count#">
                              <option value="" selected>Make A Selection</option>
                              <cfloop query="getHardwareFail">
                              <option value="#pk_hardwareFailure#"<cfif #pk_hardwareFailure# is #type_hardware_failure#>selected</cfif>>#pk_hardwareFailure#</option>
                              </cfloop>
                              </select>
                              </td>
                              </tr>
                              <table>
                               
                              <!--- Shows what was previously entered for Serial Number and Software/Hardware  --->
                              <table class="zpExpandedTable" id="modeltable">
                              <tr>
                              <td id="paddingformultitop">
                              Serial Number:&nbsp;&nbsp;
                              <input type="text" name="serialnum_#count#" value="#pka_serialNo#">
                              &nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;
                              <select name="softhardware_#count#">
                              <option value="" selected>No Choice</option>
                              <cfloop query="getSoftHard">
                              <option value="#pk_softwareHardware#"<cfif #pk_softwareHardware# is #software_hardware#>selected</cfif>>#pk_softwareHardware#</option>
                              </cfloop>
                              </select>
                              </td>
                              </tr>
                              </table>
                              
                              <!--- Shows what was previously entered for Description ---> 
                              
                              <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0">
                              <tr>
                              <td id="paddingformutli">
                              Description:&nbsp;&nbsp;
                              </td>
                              <td class="descriptionmoveinmulti">
                              ( You may enter up to 500 characters. )
                              <br>
                              <cfloop query="description"><textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="thedescription_#count#">#description#</textarea></cfloop> 
                              </td>
                              </tr>
                              </table>
                               
                              <!---Shows what was previously entered for Resolution  --->
                              
                              <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
                              <tr>
                              <td id="paddingformutli">
                              Resolution:&nbsp;&nbsp;
                              </td>
                              <td class="resolutionmoveinmulti">
                              ( You may enter up to 500 characters. )
                              <br>
                              <textarea  maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="resolution_#count#">#resolution#</textarea>
                              </td>
                              </tr>
                              </table>
                               
                              <!--- Shows what was previously entered for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
                              
                              <table class="zpExpandedTable" id="resoldatetab" cellpadding="1" cellspacing="0">
                              <tr>
                              <td id="paddingformultitop">
                              Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
                              </td>
                              <td>
                              <input type="text" name="resdate_#count#" value="#resolution_date#">&nbsp;&nbsp;
                               
                              &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
                              <!---<input type="checkbox" name="currentdateresol_' + count + '" onClick=resdate_" + count + ".value=fill_date()>--->
                              
                              </td>
                              <td>
                              Resolution Verified as effective by:&nbsp;&nbsp;
                              </td>
                              <td>
                              <select name="resvertified_#count#">
                              <option value="" selected>Make A Selection</option>
                              <cfloop query="gettech">
                              <option value="#fname# #lname#"<cfif "#fname# #lname#" is #resolution_verified_by#>selected</cfif>>#fname# #lname#</option>
                              </cfloop>
                              </select>
                              </td>
                              </tr>
                              </table>
                              <!--- Shows what was previously entered for Vertification Date, Current Date (for vertification date)   --->
                              <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
                              <tr>
                              <td id="paddingformultitop">
                              Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
                              </td>
                              <td class="vertificationmoveinmulti">
                              <input type="text" name="vertifidate_#count#" value="#verification_date#">&nbsp;&nbsp;
                              &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
                              <!---<input type="checkbox" name="currentdatevert_' + count + '" onClick=vertifidate_" + count + ".value=fill_date()>--->
                              </td>
                              </tr>
                              </table>
                               
                              <!--- Shows what was previously entered for Dept/Vendor Responsibility  --->
                              <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
                              <tr>
                              <td class="red" id="paddingformultitop">
                              Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                              <select name="deptvendor_#count#">
                              <option value="" selected>Make A Selection</option>
                              <cfloop query="getDeptVendor">
                              <option value="#pk_deptVendor#"<cfif #pk_deptVendor# is #dept_responsibility#>selected</cfif>>#pk_deptVendor#</option>
                              </cfloop>
                              </select>
                              </td>
                              </tr>
                              </table>
                               
                              <!--- Shows what was previously entered for RMA Data Only  --->
                              <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
                              <tr>
                              <td id="paddingformultitop">
                              RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;
                              </td>
                              <td class="rmanmoveinmulti">
                              ( You may enter up to 500 characters. )
                              <br/>
                              <textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="rma_#count#" >#rma_data#</textarea>
                              </td>
                              </tr>
                              </table>
                              <!---<input type="hidden" name="serialcount" value="#count#">--->
                               
                              <!--- Adds Delete to every ticket  --->
                              <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
                              <tr>
                              <td>
                              <!---<input type="button" class="removeticket" value="Remove Serial &quot;'+count +'&quot;" onclick=\"removeElement(\'"+divIdName+"\')\">--->
                              <input type="button" class="removeticket" value="Remove Serial #count#" onclick="removeElement('dynamic#count#Input')">
                              </td>
                              </tr>
                              </table>
                              </div>
                              </cfoutput>
                              <input type="hidden" value="<cfoutput>#count#</cfoutput>" name="theValue" id="theValue" />
                              </cfif>
                              Thank you,
                              Rach

                              Comment

                              • acoder
                                Recognized Expert MVP
                                • Nov 2006
                                • 16032

                                #45
                                No, the cfif must be outside the cfoutput query unless this is copied code and the previous code is untouched in which case you need to remove all code which references the query and its fields because there are no records.

                                One possibility that might make sense here is to have one file which contains the table and you set the variables before you call the file. This would avoid this repetition in the code which feels wrong and looks ugly.

                                Note that Coldfusion generates the JavaScript, so you can't move that into its own file unless it's a Coldfusion file rather than a JavaScript one.

                                Comment

                                Working...