473,394 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

how to loop through this?

769 512MB
Hey Everyone,

What i am trying to do is show previously entered information. I know i need a loop for this , but i am not sure how to loop through this based on my form appears all in the javascript

here is my code
Expand|Select|Wrap|Line Numbers
  1. <cfquery name="serial" datasource="CustomerSupport">
  2.         SELECT pka_serialNo,pkb_fk_ticketNo,model_no,product_type,software_hardware,resolution,resolution_date,
  3.          verification_date,rma_data,type_hardware_failure,dept_responsibility,resolution_verified_by FROM dbo.tbl_CS_serial
  4. </cfquery>
  5.  
  6. <cfoutput query="serial">
  7. <cfset model_no = #model_no#>
  8. <cfset product_type = #product_type#>
  9. <cfset type_hardware_failure = #type_hardware_failure#>
  10. <cfset software_hardware = #software_hardware#>
  11. <cfset resolution_verified_by = #resolution_verified_by#>
  12. <cfset dept_responsibility = #dept_responsibility#>
  13. </cfoutput>
  14.  
  15. <script type="text/javascript">
  16.  
  17. <!---Allows us to show previous fields --->
  18.  
  19. function showInput(divName){
  20. var dynamic = document.getElementById('dynamicInput');
  21. var thevalue = document.getElementById('theValue');
  22. var count = (document.getElementById('theValue').value -1)+ 2;
  23. thevalue.value = count;
  24. var newdiv = document.createElement('div');
  25. var divIdName = 'dynamic'+count+'Input';
  26. newdiv.setAttribute('id',divIdName);
  27.  
  28.  
  29. <!--- Adds Extra fields for Model No, Product Type, and Type of Hardware Failure  --->
  30. newdiv.innerHTML =
  31.  
  32. "<table class='zpExpandedTable' id='modeltable'>" +
  33. "<th class='sectiontitletick' colspan='7'>Serial Information "+ count +" </th>" +
  34. "<tr>" +
  35. "<td id='paddingformultitop'>Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>" +
  36. "</td>" +
  37. "<td>" +
  38.  "<select name='modelno_" + count + "'>" +
  39.  "<option value=''>Make A Selection</option>" +
  40. "<cfoutput query='models'>" + 
  41. "<option value='#model#'<cfif #model# is #evaluate(model_no)#>selected</cfif>>#model#</option>" + 
  42. "</cfoutput>" + 
  43.  "</select>" +
  44.  "</td>" +
  45.  "<td>" +
  46. "&nbsp;&nbsp;&nbsp;&nbsp;Product Type:"  +
  47. "</td>" +
  48. "<td>" +
  49. "<select name='producttype_" + count + "'>" +
  50. "<option value='' selected>No Choice</option>" +
  51. "<cfoutput query='getProdType'>" + 
  52. "<option value='#pk_productType#'<cfif #pk_productType# is #product_type#>selected</cfif>>#pk_productType#</option>" + 
  53. "</cfoutput>" + 
  54. "</select>" +
  55. "</td>" +
  56. "<td class='red'>" +
  57. "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:" +
  58. "</td>" +
  59. "<td>" +
  60. "<select name='hardwarefailure_" + count + "'>" +
  61. "<option value='' selected>Make A Selection</option>" +
  62. "<cfoutput query='getHardwareFail'>" +
  63. "<option value='#pk_hardwareFailure#'<cfif #pk_hardwareFailure# is #type_hardware_failure#>selected</cfif>>#pk_hardwareFailure#</option>" +
  64. "</cfoutput>" +
  65. "</select>" +
  66. "</td>" +
  67. "</tr>" +
  68. "<table>";
  69.  
  70. <!--- Adds Extra fields for Serial Number and Software/Hardware  --->
  71. newdiv.innerHTML = newdiv.innerHTML +
  72. "<table class='zpExpandedTable' id='modeltable'>" +
  73. "<tr>" +
  74. "<td id='paddingformultitop'>" +
  75. "Serial Number:&nbsp;&nbsp;" +
  76. "<cfoutput query="serial"><input type='text' name='serialnum_" + count + "' value='#pka_serialNo#' ></cfoutput>" +
  77. "&nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;" +
  78. "<select name='softhardware_" + count + "'>" +
  79. "<option value='' selected>No Choice</option>" +
  80. "<cfoutput query='getSoftHard'>" + 
  81. "<option value='#pk_softwareHardware#'<cfif #pk_softwareHardware# is #software_hardware#>selected</cfif>>#pk_softwareHardware#</option>" + 
  82. "</cfoutput>" + 
  83. "</select>" +
  84. "</td>" +
  85. "</tr>" +
  86. "</table>";
  87.  
  88. <!--- Adds Extra fields for Description ---> 
  89. newdiv.innerHTML = newdiv.innerHTML + 
  90. "<table class='zpExpandedTable' id='resoltable' cellpadding='3' cellspacing='0'>" +
  91. "<tr>" +
  92. "<td id='paddingformutli'>" +
  93. "Description:&nbsp;&nbsp;" + 
  94. "</td>" +
  95. "<td class='descriptionmoveinmulti'>" +
  96. "( You may enter up to 500 characters. )"+
  97. "<br>" +
  98. "<cfoutput query="description"><textarea maxlength='500' onkeyup='return ismaxlength(this)' onkeydown='return ismaxlength(this)'rows='4' cols='60' name='thedescription_" + count + "'>#description#</textarea></cfoutput>" + 
  99. "</td>" +
  100. "</tr>" +
  101. "</table>";
  102.  
  103. <!--- Adds Extra fields for Resolution  --->
  104. newdiv.innerHTML = newdiv.innerHTML +
  105. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  106. "<tr>" +
  107. "<td id='paddingformutli'>" +
  108. "Resolution:&nbsp;&nbsp;" +
  109. "</td>" +
  110. "<td class='resolutionmoveinmulti'>" +
  111. "( You may enter up to 500 characters. )"+
  112. "<br>" +
  113. "<cfoutput query='serial'><textarea  maxlength='500' onkeyup='return ismaxlength(this)' onkeydown='return ismaxlength(this)' rows='4' cols='60' name='resolution_" + count + "'>#resolution#</textarea></cfoutput>" +
  114. "</td>" +
  115. "</tr>" +
  116. "</table>";
  117.  
  118. <!--- Adds Extra fields for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
  119. newdiv.innerHTML = newdiv.innerHTML +
  120. "<table class='zpExpandedTable' id='resoldatetab' cellpadding='1' cellspacing='0'>" +
  121. "<tr>" +
  122. "<td id='paddingformultitop'>" +
  123. "Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;" +
  124. "</td>" +
  125. "<td>" +
  126. "<cfoutput query='serial'><input type='text' name='resdate_" + count + "' value='#resolution_date#'>&nbsp;&nbsp;</cfoutput>" +
  127.  
  128. "&nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;" +
  129. "<input type='checkbox' name='currentdateresol_" + count + "' onClick=resdate_" + count + ".value=fill_date()>" +
  130. "</td>" +
  131. "<td>" +
  132. "Resolution Verified as effective by:&nbsp;&nbsp;"  +
  133. "</td>" +
  134. "<td>" +
  135. "<select name='resvertified_" + count + "'>" +
  136. "<option value='' selected>Make A Selection</option>" +
  137. "<cfoutput query='gettech'>" +
  138. "<option value='#fname# #lname#'<cfif "#fname# #lname#" is #resolution_verified_by#>selected</cfif>>#fname# #lname#</option>" +
  139. " </cfoutput>" +
  140. "</select>" +
  141. "</td>" +
  142. "</tr>" +
  143. "</table>";
  144.  
  145.  
  146. <!--- Adds Extra fields for Vertification Date, Current Date (for vertification date)   --->
  147. newdiv.innerHTML = newdiv.innerHTML +
  148. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  149. "<tr>" +
  150. "<td id='paddingformultitop'>" +
  151. "Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;" +
  152. "</td>" +
  153. "<td class='vertificationmoveinmulti'>" +
  154. "<cfoutput query='serial'><input type='text' name='vertifidate_" + count + "' value='#verification_date#'>&nbsp;&nbsp;</cfoutput>" +
  155. "&nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;" +
  156. "<input type='checkbox' name='currentdatevert_" + count + "' onClick=vertifidate_" + count + ".value=fill_date()>" +
  157. "</td>" +
  158. "</tr>" +
  159. "</table>";
  160.  
  161. <!--- Adds Extra fields for Dept/Vendor Responsibility  --->
  162. newdiv.innerHTML = newdiv.innerHTML +
  163. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  164. "<tr>" +
  165. "<td class='red' id='paddingformultitop'>" +
  166. "Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"  +
  167. "<select name='deptvendor_" + count + "'>" +
  168. "<option value='' selected>Make A Selection</option>" +
  169. "<cfoutput query='getDeptVendor'>" +
  170. "<option value='#pk_deptVendor#'<cfif #pk_deptVendor# is #dept_responsibility#>selected</cfif>>#pk_deptVendor#</option>" +
  171. " </cfoutput>" +
  172. "</select>" +
  173. "</td>" +
  174. "</tr>" +
  175. "</table>";
  176.  
  177. <!--- Adds Extra fields for RMA Data Only  --->
  178. newdiv.innerHTML = newdiv.innerHTML +
  179. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  180. "<tr>" +
  181. "<td id='paddingformultitop'>" +
  182. "RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;" +
  183. "</td>" +
  184. "<td class='rmanmoveinmulti'>" +
  185. "( You may enter up to 500 characters. )"+
  186. "<br/>" +
  187. "<cfoutput query='serial'><textarea maxlength='500' onkeyup='return ismaxlength(this)' onkeydown='return ismaxlength(this)' rows='4' cols='60' name='rma_" + count + "' >#rma_data#</textarea></cfoutput> " +
  188. "</td>" +
  189. "</tr>" +
  190. "</table>" +
  191. "<input type='hidden' name='serialcount' value='" + count + "'>";
  192.  
  193. <!--- Adds Delete to every ticket  --->
  194. newdiv.innerHTML = newdiv.innerHTML +
  195. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  196. "<tr>" +
  197. "<td>" +
  198. "<input type='button' class='removeticket' value='Remove Serial &quot;"+count +"&quot;' onclick=\"removeElement(\'"+divIdName+"\')\"></a>" +
  199. "</td>" +
  200. "</td>" +
  201. "</tr>" +
  202. "</table><br>";
  203.  
  204.  document.getElementById(divName).appendChild(newdiv);
  205.  
  206. </script>

i was using this after i submitted my form to loop through it. it was used to submit the form fields and also show a print screen on what was previously entered.

Expand|Select|Wrap|Line Numbers
  1. <CFSET machineListLen = listLen(Form.serialcount)>
  2. <CFLOOP from="1" to="#machineListLen#" index="machineCount">
  3.  <CFSET serialnum       = "Form.serialnum_" & machineCount>
  4.  <CFSET modelno         = "Form.modelno_" & machineCount>
  5.  <CFSET producttype     = "Form.producttype_" & machineCount>
  6.  <CFSET softhardware    = "Form.softhardware_" & machineCount>
  7.  <CFSET resolution      = "Form.resolution_" & machineCount>
  8.  <CFSET resdate         = "Form.resdate_" & machineCount>
  9.  <CFSET resvertified    = "Form.resvertified_" & machineCount>
  10.  <CFSET vertifidate     = "Form.vertifidate_" & machineCount>
  11.  <CFSET deptvendor      = "Form.deptvendor_" & machinecount>
  12.  <CFSET hardwarefailure = "Form.hardwarefailure_" & machineCount>
  13.  <CFSET rma             = "Form.rma_" & machineCount>
  14.  <CFSET thedescription  = "Form.thedescription_" & machineCount>
  15.  
  16. #evaluate(modelno)#....an so on.
but i am not sure if i can combine the above with what i have now because i am showing previously entered data an not entering the data.

Thank you for all the help,
Rach
Sep 22 '08 #1

✓ answered by acoder

Almost. There's no need for any JavaScript here because you're calling it onload anyway. Convert all the JavaScript into Coldfusion instead so that the table/form appears whilst the page is loading and not after. To convert the JavaScript is not difficult. Take all the table and form code and put it directly in the div. The cfloop would be for each ticket, so there would be no repetition.

60 5190
acoder
16,027 Expert Mod 8TB
Rather than using JavaScript to show the information onload, use Coldfusion directly in the HTML inside the "dynamicInput" div using a loop (cfoutput or cfloop) to loop over the query. Convert the JavaScript innerHTML statements into normal HTML code.
Sep 22 '08 #2
bonneylake
769 512MB
Rather than using JavaScript to show the information onload, use Coldfusion directly in the HTML inside the "dynamicInput" div using a loop (cfoutput or cfloop) to loop over the query. Convert the JavaScript innerHTML statements into normal HTML code.
Hey Acoder,

Ok so let me make sure i understand you correctly.So take all the form information inside the javascript copy it and turn it into just HTML an put it in my <div id="dynamicInput"> an then apply the cfloop to it. Then in the javscript part turn it in just HTML? Just want to make sure i understand before i go ahead.

Thank you,
Rach
Sep 22 '08 #3
acoder
16,027 Expert Mod 8TB
Almost. There's no need for any JavaScript here because you're calling it onload anyway. Convert all the JavaScript into Coldfusion instead so that the table/form appears whilst the page is loading and not after. To convert the JavaScript is not difficult. Take all the table and form code and put it directly in the div. The cfloop would be for each ticket, so there would be no repetition.
Sep 22 '08 #4
bonneylake
769 512MB
Almost. There's no need for any JavaScript here because you're calling it onload anyway. Convert all the JavaScript into Coldfusion instead so that the table/form appears whilst the page is loading and not after. To convert the JavaScript is not difficult. Take all the table and form code and put it directly in the div. The cfloop would be for each ticket, so there would be no repetition.
Hey Acoder,

I hate to say this but i am still very confused. This is what i have below. Do i need to remove the function showInput since i was using that one to show what was previously entered? an do i apply the cfloop i was using above or do i create a different one? a bit confused.


Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2.  
  3. <!---Allows us to show previous fields --->
  4.  
  5. function showInput(divName){
  6. var dynamic = document.getElementById('dynamicInput');
  7. var thevalue = document.getElementById('theValue');
  8. var count = (document.getElementById('theValue').value -1)+ 2;
  9. thevalue.value = count;
  10. var newdiv = document.createElement('div');
  11. var divIdName = 'dynamic'+count+'Input';
  12. newdiv.setAttribute('id',divIdName);
  13.  
  14.  
  15. <!--- Adds Extra fields for Model No, Product Type, and Type of Hardware Failure  --->
  16. newdiv.innerHTML =
  17.  
  18. "<table class='zpExpandedTable' id='modeltable'>" +
  19. "<th class='sectiontitletick' colspan='7'>Serial Information "+ count +" </th>" +
  20. "<tr>" +
  21. "<td id='paddingformultitop'>Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>" +
  22. "</td>" +
  23. "<td>" +
  24.  "<select name='modelno_" + count + "'>" +
  25.  "<option value=''>Make A Selection</option>" +
  26. "<cfoutput query='models'>" + 
  27. "<option value='#model#'<cfif #model# is #model_no#>selected</cfif>>#model#</option>" + 
  28. "</cfoutput>" + 
  29.  "</select>" +
  30.  "</td>" +
  31.  "<td>" +
  32. "&nbsp;&nbsp;&nbsp;&nbsp;Product Type:"  +
  33. "</td>" +
  34. "<td>" +
  35. "<select name='producttype_" + count + "'>" +
  36. "<option value='' selected>No Choice</option>" +
  37. "<cfoutput query='getProdType'>" + 
  38. "<option value='#pk_productType#'<cfif #pk_productType# is #product_type#>selected</cfif>>#pk_productType#</option>" + 
  39. "</cfoutput>" + 
  40. "</select>" +
  41. "</td>" +
  42. "<td class='red'>" +
  43. "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:" +
  44. "</td>" +
  45. "<td>" +
  46. "<select name='hardwarefailure_" + count + "'>" +
  47. "<option value='' selected>Make A Selection</option>" +
  48. "<cfoutput query='getHardwareFail'>" +
  49. "<option value='#pk_hardwareFailure#'<cfif #pk_hardwareFailure# is #type_hardware_failure#>selected</cfif>>#pk_hardwareFailure#</option>" +
  50. "</cfoutput>" +
  51. "</select>" +
  52. "</td>" +
  53. "</tr>" +
  54. "<table>";
  55.  
  56. <!--- Adds Extra fields for Serial Number and Software/Hardware  --->
  57. newdiv.innerHTML = newdiv.innerHTML +
  58. "<table class='zpExpandedTable' id='modeltable'>" +
  59. "<tr>" +
  60. "<td id='paddingformultitop'>" +
  61. "Serial Number:&nbsp;&nbsp;" +
  62. "<cfoutput query="serial"><input type='text' name='serialnum_" + count + "' value='#pka_serialNo#' ></cfoutput>" +
  63. "&nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;" +
  64. "<select name='softhardware_" + count + "'>" +
  65. "<option value='' selected>No Choice</option>" +
  66. "<cfoutput query='getSoftHard'>" + 
  67. "<option value='#pk_softwareHardware#'<cfif #pk_softwareHardware# is #software_hardware#>selected</cfif>>#pk_softwareHardware#</option>" + 
  68. "</cfoutput>" + 
  69. "</select>" +
  70. "</td>" +
  71. "</tr>" +
  72. "</table>";
  73.  
  74. <!--- Adds Extra fields for Description ---> 
  75. newdiv.innerHTML = newdiv.innerHTML + 
  76. "<table class='zpExpandedTable' id='resoltable' cellpadding='3' cellspacing='0'>" +
  77. "<tr>" +
  78. "<td id='paddingformutli'>" +
  79. "Description:&nbsp;&nbsp;" + 
  80. "</td>" +
  81. "<td class='descriptionmoveinmulti'>" +
  82. "( You may enter up to 500 characters. )"+
  83. "<br>" +
  84. "<cfoutput query="description"><textarea maxlength='500' onkeyup='return ismaxlength(this)' onkeydown='return ismaxlength(this)'rows='4' cols='60' name='thedescription_" + count + "'>#description#</textarea></cfoutput>" + 
  85. "</td>" +
  86. "</tr>" +
  87. "</table>";
  88.  
  89. <!--- Adds Extra fields for Resolution  --->
  90. newdiv.innerHTML = newdiv.innerHTML +
  91. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  92. "<tr>" +
  93. "<td id='paddingformutli'>" +
  94. "Resolution:&nbsp;&nbsp;" +
  95. "</td>" +
  96. "<td class='resolutionmoveinmulti'>" +
  97. "( You may enter up to 500 characters. )"+
  98. "<br>" +
  99. "<cfoutput query='serial'><textarea  maxlength='500' onkeyup='return ismaxlength(this)' onkeydown='return ismaxlength(this)' rows='4' cols='60' name='resolution_" + count + "'>#resolution#</textarea></cfoutput>" +
  100. "</td>" +
  101. "</tr>" +
  102. "</table>";
  103.  
  104. <!--- Adds Extra fields for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
  105. newdiv.innerHTML = newdiv.innerHTML +
  106. "<table class='zpExpandedTable' id='resoldatetab' cellpadding='1' cellspacing='0'>" +
  107. "<tr>" +
  108. "<td id='paddingformultitop'>" +
  109. "Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;" +
  110. "</td>" +
  111. "<td>" +
  112. "<cfoutput query='serial'><input type='text' name='resdate_" + count + "' value='#resolution_date#'>&nbsp;&nbsp;</cfoutput>" +
  113.  
  114. "&nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;" +
  115. "<input type='checkbox' name='currentdateresol_" + count + "' onClick=resdate_" + count + ".value=fill_date()>" +
  116. "</td>" +
  117. "<td>" +
  118. "Resolution Verified as effective by:&nbsp;&nbsp;"  +
  119. "</td>" +
  120. "<td>" +
  121. "<select name='resvertified_" + count + "'>" +
  122. "<option value='' selected>Make A Selection</option>" +
  123. "<cfoutput query='gettech'>" +
  124. "<option value='#fname# #lname#'<cfif "#fname# #lname#" is #resolution_verified_by#>selected</cfif>>#fname# #lname#</option>" +
  125. " </cfoutput>" +
  126. "</select>" +
  127. "</td>" +
  128. "</tr>" +
  129. "</table>";
  130.  
  131.  
  132. <!--- Adds Extra fields for Vertification Date, Current Date (for vertification date)   --->
  133. newdiv.innerHTML = newdiv.innerHTML +
  134. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  135. "<tr>" +
  136. "<td id='paddingformultitop'>" +
  137. "Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;" +
  138. "</td>" +
  139. "<td class='vertificationmoveinmulti'>" +
  140. "<cfoutput query='serial'><input type='text' name='vertifidate_" + count + "' value='#verification_date#'>&nbsp;&nbsp;</cfoutput>" +
  141. "&nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;" +
  142. "<input type='checkbox' name='currentdatevert_" + count + "' onClick=vertifidate_" + count + ".value=fill_date()>" +
  143. "</td>" +
  144. "</tr>" +
  145. "</table>";
  146.  
  147. <!--- Adds Extra fields for Dept/Vendor Responsibility  --->
  148. newdiv.innerHTML = newdiv.innerHTML +
  149. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  150. "<tr>" +
  151. "<td class='red' id='paddingformultitop'>" +
  152. "Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"  +
  153. "<select name='deptvendor_" + count + "'>" +
  154. "<option value='' selected>Make A Selection</option>" +
  155. "<cfoutput query='getDeptVendor'>" +
  156. "<option value='#pk_deptVendor#'<cfif #pk_deptVendor# is #dept_responsibility#>selected</cfif>>#pk_deptVendor#</option>" +
  157. " </cfoutput>" +
  158. "</select>" +
  159. "</td>" +
  160. "</tr>" +
  161. "</table>";
  162.  
  163. <!--- Adds Extra fields for RMA Data Only  --->
  164. newdiv.innerHTML = newdiv.innerHTML +
  165. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  166. "<tr>" +
  167. "<td id='paddingformultitop'>" +
  168. "RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;" +
  169. "</td>" +
  170. "<td class='rmanmoveinmulti'>" +
  171. "( You may enter up to 500 characters. )"+
  172. "<br/>" +
  173. "<cfoutput query='serial'><textarea maxlength='500' onkeyup='return ismaxlength(this)' onkeydown='return ismaxlength(this)' rows='4' cols='60' name='rma_" + count + "' >#rma_data#</textarea></cfoutput> " +
  174. "</td>" +
  175. "</tr>" +
  176. "</table>" +
  177. "<input type='hidden' name='serialcount' value='" + count + "'>";
  178.  
  179. <!--- Adds Delete to every ticket  --->
  180. newdiv.innerHTML = newdiv.innerHTML +
  181. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  182. "<tr>" +
  183. "<td>" +
  184. "<input type='button' class='removeticket' value='Remove Serial &quot;"+count +"&quot;' onclick=\"removeElement(\'"+divIdName+"\')\"></a>" +
  185. "</td>" +
  186. "</td>" +
  187. "</tr>" +
  188. "</table><br>";
  189.  
  190.  document.getElementById(divName).appendChild(newdiv);
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  <!---Allows us to add serial information multiple times --->
  198. function addInput(divName){
  199. var dynamic = document.getElementById('dynamicInput');
  200. var thevalue = document.getElementById('theValue');
  201. var count = (document.getElementById('theValue').value -1)+ 2;
  202. thevalue.value = count;
  203. var newdiv = document.createElement('div');
  204. var divIdName = 'dynamic'+count+'Input';
  205. newdiv.setAttribute('id',divIdName);
  206.  
  207. <!--- Adds Extra fields for Model No, Product Type, and Type of Hardware Failure  --->
  208. newdiv.innerHTML =
  209. "<table class='zpExpandedTable' id='modeltable'>" +
  210. "<th class='sectiontitletick' colspan='7'>Serial Information "+ count +" </th>" +
  211. "<tr>" +
  212. "<td id='paddingformultitop'>Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>" +
  213. "</td>" +
  214. "<td>" +
  215.  "<select name='modelno_" + count + "' >" +
  216.  "<option value=''>Make A Selection</option>" +
  217. "<cfoutput query='models'>" + 
  218. "<option value='#model#'>#model#</option>" + 
  219. "</cfoutput>" + 
  220.  "</select>" +
  221.  "</td>" +
  222.  "<td>" +
  223. "&nbsp;&nbsp;&nbsp;&nbsp;Product Type:"  +
  224. "</td>" +
  225. "<td>" +
  226. "<select name='producttype_" + count + "'>" +
  227. "<option value='' selected>No Choice</option>" +
  228. "<cfoutput query='getProdType'>" + 
  229. "<option value='#pk_productType#'>#pk_productType#</option>" + 
  230. "</cfoutput>" + 
  231. "</select>" +
  232. "</td>" +
  233. "<td class='red'>" +
  234. "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:" +
  235. "</td>" +
  236. "<td>" +
  237. "<select name='hardwarefailure_" + count + "'>" +
  238. "<option value='' selected>Make A Selection</option>" +
  239. "<cfoutput query='getHardwareFail'>" +
  240. "<option value='#pk_hardwareFailure#'>#pk_hardwareFailure#</option>" +
  241. "</cfoutput>" +
  242. "</select>" +
  243. "</td>" +
  244. "</tr>" +
  245. "<table>";
  246.  
  247. <!--- Adds Extra fields for Serial Number and Software/Hardware  --->
  248. newdiv.innerHTML = newdiv.innerHTML +
  249. "<table class='zpExpandedTable' id='modeltable'>" +
  250. "<tr>" +
  251. "<td id='paddingformultitop'>" +
  252. "Serial Number:&nbsp;&nbsp;" +
  253. "<input type='text' name='serialnum_" + count + "'>" +
  254. "&nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;" +
  255. "<select name='softhardware_" + count + "'>" +
  256. "<option value='' selected>No Choice</option>" +
  257. "<cfoutput query='getSoftHard'>" + 
  258. "<option value='#pk_softwareHardware#'>#pk_softwareHardware#</option>" + 
  259. "</cfoutput>" + 
  260. "</select>" +
  261. "</td>" +
  262. "</tr>" +
  263. "</table>";
  264.  
  265. <!--- Adds Extra fields for Description  --->
  266. newdiv.innerHTML = newdiv.innerHTML + 
  267. "<table class='zpExpandedTable' id='resoltable' cellpadding='3' cellspacing='0'>" +
  268. "<tr>" +
  269. "<td id='paddingformutli'>" +
  270. "Description:&nbsp;&nbsp;" + 
  271. "</td>" +
  272. "<td class='descriptionmoveinmulti'>" +
  273. "( You may enter up to 500 characters. )"+
  274. "<br>" +
  275. "<textarea maxlength='500' onkeyup='return ismaxlength(this)' onkeydown='return ismaxlength(this)'rows='4' cols='60' name='thedescription_" + count + "'></textarea>" + 
  276. "</td>" +
  277. "</tr>" +
  278. "</table>";
  279.  
  280. <!--- Adds Extra fields for Resolution  --->
  281. newdiv.innerHTML = newdiv.innerHTML +
  282. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  283. "<tr>" +
  284. "<td id='paddingformutli'>" +
  285. "Resolution:&nbsp;&nbsp;" +
  286. "</td>" +
  287. "<td class='resolutionmoveinmulti'>" +
  288. "( You may enter up to 500 characters. )"+
  289. "<br>" +
  290. "<textarea  maxlength='500' onkeyup='return ismaxlength(this)' onkeydown='return ismaxlength(this)' rows='4' cols='60' name='resolution_" + count + "'></textarea>" +
  291. "</td>" +
  292. "</tr>" +
  293. "</table>";
  294.  
  295. <!--- Adds Extra fields for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
  296. newdiv.innerHTML = newdiv.innerHTML +
  297. "<table class='zpExpandedTable' id='resoldatetab' cellpadding='1' cellspacing='0'>" +
  298. "<tr>" +
  299. "<td id='paddingformultitop'>" +
  300. "Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;" +
  301. "</td>" +
  302. "<td>" +
  303. "<input type='text' name='resdate_" + count + "' value=''  >&nbsp;&nbsp;" +
  304.  
  305. "&nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;" +
  306. "<input type='checkbox' name='currentdateresol_" + count + "' onClick=resdate_" + count + ".value=fill_date()>" +
  307. "</td>" +
  308. "<td>" +
  309.  
  310. "Resolution Verified as effective by:&nbsp;&nbsp;"  +
  311. "</td>" +
  312. "<td>" +
  313. "<select name='resvertified_" + count + "'>" +
  314. "<option value='' selected>Make A Selection</option>" +
  315. "<cfoutput query='gettech'><option value='#fname# #lname#'>#fname# #lname#</option></cfoutput></select>" +
  316. "</td>" +
  317. "</tr>" +
  318. "</table>";
  319.  
  320. <!--- Adds Extra fields for Vertification Date, Current Date (for vertification date) and resolution vertified as effective by  --->
  321. newdiv.innerHTML = newdiv.innerHTML +
  322. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  323. "<tr>" +
  324. "<td id='paddingformultitop'>" +
  325. "Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;" +
  326. "</td>" +
  327. "<td class='vertificationmoveinmulti'>" +
  328. "<input type='text' name='vertifidate_" + count + "'>&nbsp;&nbsp;" +
  329. "&nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;" +
  330. "<input type='checkbox' name='currentdatevert_" + count + "' onClick=vertifidate_" + count + ".value=fill_date()>" +
  331. "</td>" +
  332. "</tr>" +
  333. "</table>";
  334.  
  335. <!--- Adds Extra fields for Dept/Vendor Responsibility  --->
  336. newdiv.innerHTML = newdiv.innerHTML +
  337. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  338. "<tr>" +
  339. "<td class='red' id='paddingformultitop'>" +
  340. "Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"  +
  341. "<select name='deptvendor_" + count + "'>" +
  342. "<option value='' selected>Make A Selection</option>" +
  343. "<cfoutput query='getDeptVendor'>" +
  344. "<option value='#pk_deptVendor#'>#pk_deptVendor#</option>" +
  345. " </cfoutput>" +
  346. "</select>" +
  347. "</td>" +
  348. "</tr>" +
  349. "</table>";
  350.  
  351. <!--- Adds Extra fields for RMA Data Only  --->
  352. newdiv.innerHTML = newdiv.innerHTML +
  353. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  354. "<tr>" +
  355. "<td id='paddingformultitop'>" +
  356. "RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;" +
  357. "</td>" +
  358. "<td class='rmanmoveinmulti'>" +
  359. "( You may enter up to 500 characters. )"+
  360. "<br/>" +
  361. "<textarea maxlength='500' onkeyup='return ismaxlength(this)' onkeydown='return ismaxlength(this)' rows='4' cols='60' name='rma_" + count + "'></textarea> " +
  362. "</td>" +
  363. "</tr>" +
  364. "</table>" +
  365. "<input type='hidden' name='serialcount' value='" + count + "'>";
  366.  
  367. <!--- Adds Delete to every ticket  --->
  368. newdiv.innerHTML = newdiv.innerHTML +
  369. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  370. "<tr>" +
  371. "<td>" +
  372. "<input type='button' class='removeticket' value='Remove Serial &quot;"+count +"&quot;' onclick=\"removeElement(\'"+divIdName+"\')\"></a>" +
  373. "</td>" +
  374. "</td>" +
  375. "</tr>" +
  376. "</table>";
  377.  
  378. document.getElementById(divName).appendChild(newdiv);
  379.  
  380.  
  381. <!---Allows us to remove multiple fields --->
  382. function removeElement(divNum) {
  383.   var d = document.getElementById('dynamicInput');
  384.   var olddiv = document.getElementById(divNum);
  385.   d.removeChild(olddiv);
  386. }
  387.  
  388. </script>
  389. <body onload="showInput('dynamicInput');">
  390. <!--- Ticket Information 
  391.        This display the ticket Information--->
  392.  
  393.  
  394.  
  395.  
  396. <input type="hidden" value="0" id="theValue" />
  397.      <div id="dynamicInput">
  398.      <!--- All Ticket Information Appears Here--->
  399.     <!--- Adds Extra fields for Model No, Product Type, and Type of Hardware Failure  --->
  400.  
  401.  
  402. <table class="zpExpandedTable" id="modeltable">
  403. <th class="sectiontitletick" colspan="7">Serial Information '+ count +' </th>
  404. <tr>
  405. <td id="paddingformultitop">Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>
  406. </td>
  407. <td>
  408. <select name="modelno_' + count + '">
  409. <option value="">Make A Selection</option>
  410. <cfoutput query="models">
  411. <option value="#model#"<cfif #model# is #model_no#>selected</cfif>>#model#</option>
  412. </cfoutput> 
  413. </select>
  414. </td>
  415. <td>
  416. &nbsp;&nbsp;&nbsp;&nbsp;Product Type:
  417. </td>
  418. <td>
  419. <select name="producttype_' + count + '">
  420. <option value="" selected>No Choice</option>
  421. <cfoutput query="getProdType">
  422. <option value="#pk_productType#"<cfif #pk_productType# is #product_type#>selected</cfif>>#pk_productType#</option> 
  423. </cfoutput>
  424. </select>
  425. </td>
  426. <td class="red'">
  427. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:
  428. </td>
  429. <td>
  430. <select name="hardwarefailure_' + count + '">
  431. <option value="" selected>Make A Selection</option>
  432. <cfoutput query="getHardwareFail">
  433. <option value="#pk_hardwareFailure#"<cfif #pk_hardwareFailure# is #type_hardware_failure#>selected</cfif>>#pk_hardwareFailure#</option>
  434. </cfoutput>
  435. </select>
  436. </td>
  437. </tr>
  438. <table>
  439.  
  440. <!--- Adds Extra fields for Serial Number and Software/Hardware  --->
  441. <table class="zpExpandedTable" id="modeltable">
  442. <tr>
  443. <td id="paddingformultitop">
  444. Serial Number:&nbsp;&nbsp;
  445. <cfoutput query="serial"><input type="text" name="serialnum_' + count + '" value="#pka_serialNo#"></cfoutput>
  446. &nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;
  447. <select name="softhardware_' + count + '">
  448. <option value="" selected>No Choice</option>
  449. <cfoutput query="getSoftHard">
  450. <option value="#pk_softwareHardware#"<cfif #pk_softwareHardware# is #software_hardware#>selected</cfif>>#pk_softwareHardware#</option>
  451. </cfoutput>
  452. </select>
  453. </td>
  454. </tr>
  455. </table>
  456.  
  457. <!--- Adds Extra fields for Description ---> 
  458.  
  459. <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0">
  460. <tr>
  461. <td id="paddingformutli">
  462. Description:&nbsp;&nbsp;
  463. </td>
  464. <td class="descriptionmoveinmulti">
  465. ( You may enter up to 500 characters. )
  466. <br>
  467. <cfoutput query="description"><textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="thedescription_' + count + '">#description#</textarea></cfoutput> 
  468. </td>
  469. </tr>
  470. </table>
  471.  
  472. <!--- Adds Extra fields for Resolution  --->
  473.  
  474. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  475. <tr>
  476. <td id="paddingformutli">
  477. Resolution:&nbsp;&nbsp;
  478. </td>
  479. <td class="resolutionmoveinmulti">
  480. ( You may enter up to 500 characters. )
  481. <br>
  482. <cfoutput query="serial"><textarea  maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="resolution_' + count + '">#resolution#</textarea></cfoutput>
  483. </td>
  484. </tr>
  485. </table>
  486.  
  487. <!--- Adds Extra fields for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
  488.  
  489. <table class="zpExpandedTable" id="resoldatetab" cellpadding="1" cellspacing="0">
  490. <tr>
  491. <td id="paddingformultitop">
  492. Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  493. </td>
  494. <td>
  495. <cfoutput query="serial"><input type="text" name="resdate_' + count + '" value="#resolution_date#">&nbsp;&nbsp;</cfoutput>
  496.  
  497. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  498. <input type="checkbox" name="currentdateresol_' + count + '" onClick=resdate_" + count + ".value=fill_date()>
  499. </td>
  500. <td>
  501. Resolution Verified as effective by:&nbsp;&nbsp;
  502. </td>
  503. <td>
  504. <select name="resvertified_' + count + '">
  505. <option value="" selected>Make A Selection</option>
  506. <cfoutput query="gettech">
  507. <option value="#fname# #lname#"<cfif "#fname# #lname#" is #resolution_verified_by#>selected</cfif>>#fname# #lname#</option>
  508. </cfoutput>
  509. </select>
  510. </td>
  511. </tr>
  512. </table>
  513.  
  514.  
  515. <!--- Adds Extra fields for Vertification Date, Current Date (for vertification date)   --->
  516. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  517. <tr>
  518. <td id="paddingformultitop">
  519. Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  520. </td>
  521. <td class="vertificationmoveinmulti">
  522. <cfoutput query="serial"><input type="text" name="vertifidate_' + count + '" value="#verification_date#">&nbsp;&nbsp;</cfoutput>
  523. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  524. <input type="checkbox" name="currentdatevert_' + count + '" onClick=vertifidate_" + count + ".value=fill_date()>
  525. </td>
  526. </tr>
  527. </table>
  528.  
  529. <!--- Adds Extra fields for Dept/Vendor Responsibility  --->
  530. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  531. <tr>
  532. <td class="red" id="paddingformultitop">
  533. Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  534. <select name="deptvendor_' + count + '">
  535. <option value="" selected>Make A Selection</option>
  536. <cfoutput query="getDeptVendor">
  537. <option value="#pk_deptVendor#"<cfif #pk_deptVendor# is #dept_responsibility#>selected</cfif>>#pk_deptVendor#</option>
  538. </cfoutput>
  539. </select>
  540. </td>
  541. </tr>
  542. </table>
  543.  
  544. <!--- Adds Extra fields for RMA Data Only  --->
  545. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  546. <tr>
  547. <td id="paddingformultitop">
  548. RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;
  549. </td>
  550. <td class="rmanmoveinmulti">
  551. ( You may enter up to 500 characters. )
  552. <br/>
  553. <cfoutput query="serial"><textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="rma_' + count + '" >#rma_data#</textarea></cfoutput>
  554. </td>
  555. </tr>
  556. </table>
  557. <input type="hidden" name="serialcount" value="' + count + '">
  558.  
  559. <!--- Adds Delete to every ticket  --->
  560. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  561. <tr>
  562. <td>
  563. <input type="button" class="removeticket" value="Remove Serial &quot;'+count +'&quot;" onclick=\"removeElement(\'"+divIdName+"\')\"></a>
  564. </td>
  565. </td>
  566. </tr>
  567. </table>
  568.  
  569.  
  570.  
  571.  
  572.  
  573.      </div>
  574.      <input type="button" class="addticket" value="Add Serial" onClick="addInput('dynamicInput');" >
Thank you,
Rach
Sep 23 '08 #5
acoder
16,027 Expert Mod 8TB
Yes, there's no need for the showInput function any more. For example, you can replace:
Expand|Select|Wrap|Line Numbers
  1. newdiv.innerHTML =
  2. "<table class='zpExpandedTable' id='modeltable'>" +
  3. "<th class='sectiontitletick' colspan='7'>Serial Information "+ count +" </th>" +
  4. "<tr>" +
with
Expand|Select|Wrap|Line Numbers
  1. <div ...>
  2. <cfoutput query="...">
  3. <table class='zpExpandedTable' id='modeltable'>
  4. <th class='sectiontitletick' colspan='7'>Serial Information #count# </th>
  5. <tr>
Sep 23 '08 #6
bonneylake
769 512MB
Yes, there's no need for the showInput function any more. For example, you can replace:
Expand|Select|Wrap|Line Numbers
  1. newdiv.innerHTML =
  2. "<table class='zpExpandedTable' id='modeltable'>" +
  3. "<th class='sectiontitletick' colspan='7'>Serial Information "+ count +" </th>" +
  4. "<tr>" +
with
Expand|Select|Wrap|Line Numbers
  1. <div ...>
  2. <cfoutput query="...">
  3. <table class='zpExpandedTable' id='modeltable'>
  4. <th class='sectiontitletick' colspan='7'>Serial Information #count# </th>
  5. <tr>
Hey Acoder,

Well i am having trouble doing the #count# part you did in your example i just get an error. An i am having trouble with my current date stuff. Basically from that point on it wont show any of the other parts in the table unless i take it out. Bolded the parts having trouble with

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2.  
  3.  <!---Allows us to add serial information multiple times --->
  4. function addInput(divName){
  5. var dynamic = document.getElementById('dynamicInput');
  6. var thevalue = document.getElementById('theValue');
  7. var count = (document.getElementById('theValue').value -1)+ 2;
  8. thevalue.value = count;
  9. var newdiv = document.createElement('div');
  10. var divIdName = 'dynamic'+count+'Input';
  11. newdiv.setAttribute('id',divIdName);
  12.  
  13. <!--- Adds Extra fields for Model No, Product Type, and Type of Hardware Failure  --->
  14. newdiv.innerHTML =
  15. "<table class='zpExpandedTable' id='modeltable'>" +
  16. "<th class='sectiontitletick' colspan='7'>Serial Information "+ count +" </th>" +
  17. "<tr>" +
  18. "<td id='paddingformultitop'>Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>" +
  19. "</td>" +
  20. "<td>" +
  21.  "<select name='modelno_" + count + "' >" +
  22.  "<option value=''>Make A Selection</option>" +
  23. "<cfoutput query='models'>" + 
  24. "<option value='#model#'>#model#</option>" + 
  25. "</cfoutput>" + 
  26.  "</select>" +
  27.  "</td>" +
  28.  "<td>" +
  29. "&nbsp;&nbsp;&nbsp;&nbsp;Product Type:"  +
  30. "</td>" +
  31. "<td>" +
  32. "<select name='producttype_" + count + "'>" +
  33. "<option value='' selected>No Choice</option>" +
  34. "<cfoutput query='getProdType'>" + 
  35. "<option value='#pk_productType#'>#pk_productType#</option>" + 
  36. "</cfoutput>" + 
  37. "</select>" +
  38. "</td>" +
  39. "<td class='red'>" +
  40. "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:" +
  41. "</td>" +
  42. "<td>" +
  43. "<select name='hardwarefailure_" + count + "'>" +
  44. "<option value='' selected>Make A Selection</option>" +
  45. "<cfoutput query='getHardwareFail'>" +
  46. "<option value='#pk_hardwareFailure#'>#pk_hardwareFailure#</option>" +
  47. "</cfoutput>" +
  48. "</select>" +
  49. "</td>" +
  50. "</tr>" +
  51. "<table>";
  52.  
  53. <!--- Adds Extra fields for Serial Number and Software/Hardware  --->
  54. newdiv.innerHTML = newdiv.innerHTML +
  55. "<table class='zpExpandedTable' id='modeltable'>" +
  56. "<tr>" +
  57. "<td id='paddingformultitop'>" +
  58. "Serial Number:&nbsp;&nbsp;" +
  59. "<input type='text' name='serialnum_" + count + "'>" +
  60. "&nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;" +
  61. "<select name='softhardware_" + count + "'>" +
  62. "<option value='' selected>No Choice</option>" +
  63. "<cfoutput query='getSoftHard'>" + 
  64. "<option value='#pk_softwareHardware#'>#pk_softwareHardware#</option>" + 
  65. "</cfoutput>" + 
  66. "</select>" +
  67. "</td>" +
  68. "</tr>" +
  69. "</table>";
  70.  
  71. <!--- Adds Extra fields for Description  --->
  72. newdiv.innerHTML = newdiv.innerHTML + 
  73. "<table class='zpExpandedTable' id='resoltable' cellpadding='3' cellspacing='0'>" +
  74. "<tr>" +
  75. "<td id='paddingformutli'>" +
  76. "Description:&nbsp;&nbsp;" + 
  77. "</td>" +
  78. "<td class='descriptionmoveinmulti'>" +
  79. "( You may enter up to 500 characters. )"+
  80. "<br>" +
  81. "<textarea maxlength='500' onkeyup='return ismaxlength(this)' onkeydown='return ismaxlength(this)'rows='4' cols='60' name='thedescription_" + count + "'></textarea>" + 
  82. "</td>" +
  83. "</tr>" +
  84. "</table>";
  85.  
  86. <!--- Adds Extra fields for Resolution  --->
  87. newdiv.innerHTML = newdiv.innerHTML +
  88. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  89. "<tr>" +
  90. "<td id='paddingformutli'>" +
  91. "Resolution:&nbsp;&nbsp;" +
  92. "</td>" +
  93. "<td class='resolutionmoveinmulti'>" +
  94. "( You may enter up to 500 characters. )"+
  95. "<br>" +
  96. "<textarea  maxlength='500' onkeyup='return ismaxlength(this)' onkeydown='return ismaxlength(this)' rows='4' cols='60' name='resolution_" + count + "'></textarea>" +
  97. "</td>" +
  98. "</tr>" +
  99. "</table>";
  100.  
  101. <!--- Adds Extra fields for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
  102. newdiv.innerHTML = newdiv.innerHTML +
  103. "<table class='zpExpandedTable' id='resoldatetab' cellpadding='1' cellspacing='0'>" +
  104. "<tr>" +
  105. "<td id='paddingformultitop'>" +
  106. "Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;" +
  107. "</td>" +
  108. "<td>" +
  109. "<input type='text' name='resdate_" + count + "' value=''  >&nbsp;&nbsp;" +
  110.  
  111. "&nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;" +
  112. "<input type='checkbox' name='currentdateresol_" + count + "' onClick=resdate_" + count + ".value=fill_date()>" +
  113. "</td>" +
  114. "<td>" +
  115.  
  116. "Resolution Verified as effective by:&nbsp;&nbsp;"  +
  117. "</td>" +
  118. "<td>" +
  119. "<select name='resvertified_" + count + "'>" +
  120. "<option value='' selected>Make A Selection</option>" +
  121. "<cfoutput query='gettech'><option value='#fname# #lname#'>#fname# #lname#</option></cfoutput></select>" +
  122. "</td>" +
  123. "</tr>" +
  124. "</table>";
  125.  
  126. <!--- Adds Extra fields for Vertification Date, Current Date (for vertification date) and resolution vertified as effective by  --->
  127. newdiv.innerHTML = newdiv.innerHTML +
  128. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  129. "<tr>" +
  130. "<td id='paddingformultitop'>" +
  131. "Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;" +
  132. "</td>" +
  133. "<td class='vertificationmoveinmulti'>" +
  134. "<input type='text' name='vertifidate_" + count + "'>&nbsp;&nbsp;" +
  135. "&nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;" +
  136. "<input type='checkbox' name='currentdatevert_" + count + "' onClick=vertifidate_" + count + ".value=fill_date()>" +
  137. "</td>" +
  138. "</tr>" +
  139. "</table>";
  140.  
  141. <!--- Adds Extra fields for Dept/Vendor Responsibility  --->
  142. newdiv.innerHTML = newdiv.innerHTML +
  143. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  144. "<tr>" +
  145. "<td class='red' id='paddingformultitop'>" +
  146. "Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"  +
  147. "<select name='deptvendor_" + count + "'>" +
  148. "<option value='' selected>Make A Selection</option>" +
  149. "<cfoutput query='getDeptVendor'>" +
  150. "<option value='#pk_deptVendor#'>#pk_deptVendor#</option>" +
  151. " </cfoutput>" +
  152. "</select>" +
  153. "</td>" +
  154. "</tr>" +
  155. "</table>";
  156.  
  157. <!--- Adds Extra fields for RMA Data Only  --->
  158. newdiv.innerHTML = newdiv.innerHTML +
  159. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  160. "<tr>" +
  161. "<td id='paddingformultitop'>" +
  162. "RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;" +
  163. "</td>" +
  164. "<td class='rmanmoveinmulti'>" +
  165. "( You may enter up to 500 characters. )"+
  166. "<br/>" +
  167. "<textarea maxlength='500' onkeyup='return ismaxlength(this)' onkeydown='return ismaxlength(this)' rows='4' cols='60' name='rma_" + count + "'></textarea> " +
  168. "</td>" +
  169. "</tr>" +
  170. "</table>" +
  171. "<input type='hidden' name='serialcount' value='" + count + "'>";
  172.  
  173. <!--- Adds Delete to every ticket  --->
  174. newdiv.innerHTML = newdiv.innerHTML +
  175. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  176. "<tr>" +
  177. "<td>" +
  178. "<input type='button' class='removeticket' value='Remove Serial &quot;"+count +"&quot;' onclick=\"removeElement(\'"+divIdName+"\')\"></a>" +
  179. "</td>" +
  180. "</td>" +
  181. "</tr>" +
  182. "</table>";
  183.  
  184. document.getElementById(divName).appendChild(newdiv);
  185. } </script>
  186.  
  187. <body onload="dynamicInput">
  188. <input type="hidden" value="0" id="theValue" />
  189.      <div id="dynamicInput">
  190.      <!--- All Ticket Information Appears Here--->
  191.     <!--- Adds Extra fields for Model No, Product Type, and Type of Hardware Failure  --->
  192.  
  193. <cfoutput query="serial">
  194. <table class="zpExpandedTable" id="modeltable">
  195. <th class="sectiontitletick" colspan="7">Serial Information '#count#' </th>
  196. <tr></cfoutput>
  197. <td id="paddingformultitop">Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>
  198. </td>
  199. <td>
  200. <select name="modelno_' + count + '">
  201. <option value="">Make A Selection</option>
  202. <cfoutput query="models">
  203. <option value="#model#"<cfif #model# is #model_no#>selected</cfif>>#model#</option>
  204. </cfoutput> 
  205. </select>
  206. </td>
  207. <td>
  208. &nbsp;&nbsp;&nbsp;&nbsp;Product Type:
  209. </td>
  210. <td>
  211. <select name="producttype_' + count + '">
  212. <option value="" selected>No Choice</option>
  213. <cfoutput query="getProdType">
  214. <option value="#pk_productType#"<cfif #pk_productType# is #product_type#>selected</cfif>>#pk_productType#</option> 
  215. </cfoutput>
  216. </select>
  217. </td>
  218. <td class="red'">
  219. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:
  220. </td>
  221. <td>
  222. <select name="hardwarefailure_' + count + '">
  223. <option value="" selected>Make A Selection</option>
  224. <cfoutput query="getHardwareFail">
  225. <option value="#pk_hardwareFailure#"<cfif #pk_hardwareFailure# is #type_hardware_failure#>selected</cfif>>#pk_hardwareFailure#</option>
  226. </cfoutput>
  227. </select>
  228. </td>
  229. </tr>
  230. <table>
  231.  
  232. <!--- Adds Extra fields for Serial Number and Software/Hardware  --->
  233. <table class="zpExpandedTable" id="modeltable">
  234. <tr>
  235. <td id="paddingformultitop">
  236. Serial Number:&nbsp;&nbsp;
  237. <cfoutput query="serial"><input type="text" name="serialnum_' + count + '" value="#pka_serialNo#"></cfoutput>
  238. &nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;
  239. <select name="softhardware_' + count + '">
  240. <option value="" selected>No Choice</option>
  241. <cfoutput query="getSoftHard">
  242. <option value="#pk_softwareHardware#"<cfif #pk_softwareHardware# is #software_hardware#>selected</cfif>>#pk_softwareHardware#</option>
  243. </cfoutput>
  244. </select>
  245. </td>
  246. </tr>
  247. </table>
  248.  
  249. <!--- Adds Extra fields for Description ---> 
  250.  
  251. <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0">
  252. <tr>
  253. <td id="paddingformutli">
  254. Description:&nbsp;&nbsp;
  255. </td>
  256. <td class="descriptionmoveinmulti">
  257. ( You may enter up to 500 characters. )
  258. <br>
  259. <cfoutput query="description"><textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="thedescription_' + count + '">#description#</textarea></cfoutput> 
  260. </td>
  261. </tr>
  262. </table>
  263.  
  264. <!--- Adds Extra fields for Resolution  --->
  265.  
  266. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  267. <tr>
  268. <td id="paddingformutli">
  269. Resolution:&nbsp;&nbsp;
  270. </td>
  271. <td class="resolutionmoveinmulti">
  272. ( You may enter up to 500 characters. )
  273. <br>
  274. <cfoutput query="serial"><textarea  maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="resolution_' + count + '">#resolution#</textarea></cfoutput>
  275. </td>
  276. </tr>
  277. </table>
  278.  
  279. <!--- Adds Extra fields for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
  280.  
  281. <table class="zpExpandedTable" id="resoldatetab" cellpadding="1" cellspacing="0">
  282. <tr>
  283. <td id="paddingformultitop">
  284. Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  285. </td>
  286. <td>
  287. <cfoutput query="serial"><input type="text" name="resdate_' + count + '" value="#resolution_date#">&nbsp;&nbsp;</cfoutput>
  288.  
  289. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  290. <input type="checkbox" name="currentdateresol_' + count + '" onClick=resdate_" + count + ".value=fill_date()>
  291.  
  292. </td>
  293. <td>
  294. Resolution Verified as effective by:&nbsp;&nbsp;
  295. </td>
  296. <td>
  297. <select name="resvertified_' + count + '">
  298. <option value="" selected>Make A Selection</option>
  299. <cfoutput query="gettech">
  300. <option value="#fname# #lname#"<cfif "#fname# #lname#" is #resolution_verified_by#>selected</cfif>>#fname# #lname#</option>
  301. </cfoutput>
  302. </select>
  303. </td>
  304. </tr>
  305. </table>
  306. <!--- Adds Extra fields for Vertification Date, Current Date (for vertification date)   --->
  307. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  308. <tr>
  309. <td id="paddingformultitop">
  310. Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  311. </td>
  312. <td class="vertificationmoveinmulti">
  313. <cfoutput query="serial"><input type="text" name="vertifidate_' + count + '" value="#verification_date#">&nbsp;&nbsp;</cfoutput>
  314. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  315. <input type="checkbox" name="currentdatevert_' + count + '" onClick=vertifidate_" + count + ".value=fill_date()>
  316. </td>
  317. </tr>
  318. </table>
  319.  
  320. <!--- Adds Extra fields for Dept/Vendor Responsibility  --->
  321. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  322. <tr>
  323. <td class="red" id="paddingformultitop">
  324. Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  325. <select name="deptvendor_' + count + '">
  326. <option value="" selected>Make A Selection</option>
  327. <cfoutput query="getDeptVendor">
  328. <option value="#pk_deptVendor#"<cfif #pk_deptVendor# is #dept_responsibility#>selected</cfif>>#pk_deptVendor#</option>
  329. </cfoutput>
  330. </select>
  331. </td>
  332. </tr>
  333. </table>
  334.  
  335. <!--- Adds Extra fields for RMA Data Only  --->
  336. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  337. <tr>
  338. <td id="paddingformultitop">
  339. RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;
  340. </td>
  341. <td class="rmanmoveinmulti">
  342. ( You may enter up to 500 characters. )
  343. <br/>
  344. <cfoutput query="serial"><textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="rma_' + count + '" >#rma_data#</textarea></cfoutput>
  345. </td>
  346. </tr>
  347. </table>
  348. <input type="hidden" name="serialcount" value="' + count + '">
  349.  
  350. <!--- Adds Delete to every ticket  --->
  351. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  352. <tr>
  353. <td>
  354. <input type="button" class="removeticket" value="Remove Serial &quot;'+count +'&quot;" onclick=\"removeElement(\'"+divIdName+"\')\"></a>
  355. </td>
  356. </td>
  357. </tr>
  358. </table>
  359.  
  360.  
  361.  
  362.  
  363.  
  364.      </div>
  365.      <input type="button" class="addticket" value="Add Serial" onClick="addInput('dynamicInput');" >
  366.  
Thank you again for all the help :),
Rach
Sep 23 '08 #7
acoder
16,027 Expert Mod 8TB
That was only an example. #count# you'd have to set in your Coldfusion, e.g. on each loop iteration increase #count# by 1.
Sep 23 '08 #8
bonneylake
769 512MB
That was only an example. #count# you'd have to set in your Coldfusion, e.g. on each loop iteration increase #count# by 1.
Hey Acoder,

But how would i apply the cfloop to this? the reason i ask is because theres so many different cfoutput cfquery for the drop down boxes in the whole form that i can't just put a cfloop around the whole thing so just wondering how i could apply that.

Thank you :),
Rach
Sep 23 '08 #9
acoder
16,027 Expert Mod 8TB
You could use cfloop instead of cfoutput for the inner queries
Sep 23 '08 #10
bonneylake
769 512MB
You could use cfloop instead of cfoutput for the inner queries
hey acoder,

i made everything into a cfloop, but now it displays all my results as whatever i set the value to like for example #model_no#, any suggestions on what i am doing wrong?


Expand|Select|Wrap|Line Numbers
  1. <cfquery name="serial" datasource="CustomerSupport">
  2.         SELECT pka_serialNo,pkb_fk_ticketNo,model_no,product_type,software_hardware,resolution,resolution_date,
  3.          verification_date,rma_data,type_hardware_failure,dept_responsibility,resolution_verified_by FROM dbo.tbl_CS_serial
  4. </cfquery>
  5.  
  6. <cfloop query="serial">
  7. <cfset model_no = #model_no#>
  8. <cfset product_type = #product_type#>
  9. <cfset type_hardware_failure = #type_hardware_failure#>
  10. <cfset software_hardware = #software_hardware#>
  11. <cfset resolution_verified_by = #resolution_verified_by#>
  12. <cfset dept_responsibility = #dept_responsibility#>
  13. </cfloop>
  14.  
  15. <!--- Ticket Information 
  16.        This display the ticket Information--->
  17.  
  18. <input type="hidden" value="0" id="theValue" />
  19.      <div id="dynamicInput">
  20.      <!--- All Ticket Information Appears Here--->
  21.     <!--- Shows what was previously entered for Model No, Product Type, and Type of Hardware Failure  --->
  22.  
  23.  
  24. <table class="zpExpandedTable" id="modeltable"> 
  25. <th class="sectiontitletick" colspan="7">Serial Information <!---#count#---> </th>
  26. <tr>
  27. <td id="paddingformultitop">Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>
  28. </td>
  29. <td>
  30. <select name="modelno_' + count + '">
  31. <option value="">Make A Selection</option>
  32. <cfloop query="models">
  33. <option value="#model#"<cfif #model# is #model_no#>selected</cfif>>#model#</option>
  34. </cfloop> 
  35. </select>
  36. </td>
  37. <td>
  38. &nbsp;&nbsp;&nbsp;&nbsp;Product Type:
  39. </td>
  40. <td>
  41. <select name="producttype_' + count + '">
  42. <option value="" selected>No Choice</option>
  43. <cfloop query="getProdType">
  44. <option value="#pk_productType#"<cfif #pk_productType# is #product_type#>selected</cfif>>#pk_productType#</option> 
  45. </cfloop>
  46. </select>
  47. </td>
  48. <td class="red'">
  49. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:
  50. </td>
  51. <td>
  52. <select name="hardwarefailure_' + count + '">
  53. <option value="" selected>Make A Selection</option>
  54. <cfloop query="getHardwareFail">
  55. <option value="#pk_hardwareFailure#"<cfif #pk_hardwareFailure# is #type_hardware_failure#>selected</cfif>>#pk_hardwareFailure#</option>
  56. </cfloop>
  57. </select>
  58. </td>
  59. </tr>
  60. <table>
  61.  
  62. <!--- Shows what was previously entered for Serial Number and Software/Hardware  --->
  63. <table class="zpExpandedTable" id="modeltable">
  64. <tr>
  65. <td id="paddingformultitop">
  66. Serial Number:&nbsp;&nbsp;
  67. <cfloop query="serial"><input type="text" name="serialnum_' + count + '" value="#pka_serialNo#"></cfloop>
  68. &nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;
  69. <select name="softhardware_' + count + '">
  70. <option value="" selected>No Choice</option>
  71. <cfloop query="getSoftHard">
  72. <option value="#pk_softwareHardware#"<cfif #pk_softwareHardware# is #software_hardware#>selected</cfif>>#pk_softwareHardware#</option>
  73. </cfloop>
  74. </select>
  75. </td>
  76. </tr>
  77. </table>
  78.  
  79. <!--- Shows what was previously entered for Description ---> 
  80.  
  81. <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0">
  82. <tr>
  83. <td id="paddingformutli">
  84. Description:&nbsp;&nbsp;
  85. </td>
  86. <td class="descriptionmoveinmulti">
  87. ( You may enter up to 500 characters. )
  88. <br>
  89. <cfloop query="description"><textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="thedescription_' + count + '">#description#</textarea></cfloop> 
  90. </td>
  91. </tr>
  92. </table>
  93.  
  94. <!---Shows what was previously entered for Resolution  --->
  95.  
  96. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  97. <tr>
  98. <td id="paddingformutli">
  99. Resolution:&nbsp;&nbsp;
  100. </td>
  101. <td class="resolutionmoveinmulti">
  102. ( You may enter up to 500 characters. )
  103. <br>
  104. <cfloop query="serial"><textarea  maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="resolution_' + count + '">#resolution#</textarea></cfloop>
  105. </td>
  106. </tr>
  107. </table>
  108.  
  109. <!--- Shows what was previously entered for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
  110.  
  111. <table class="zpExpandedTable" id="resoldatetab" cellpadding="1" cellspacing="0">
  112. <tr>
  113. <td id="paddingformultitop">
  114. Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  115. </td>
  116. <td>
  117. <cfloop query="serial"><input type="text" name="resdate_' + count + '" value="#resolution_date#">&nbsp;&nbsp;</cfloop>
  118.  
  119. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  120. <!---<input type="checkbox" name="currentdateresol_' + count + '" onClick=resdate_" + count + ".value=fill_date()>--->
  121.  
  122. </td>
  123. <td>
  124. Resolution Verified as effective by:&nbsp;&nbsp;
  125. </td>
  126. <td>
  127. <select name="resvertified_' + count + '">
  128. <option value="" selected>Make A Selection</option>
  129. <cfloop query="gettech">
  130. <option value="#fname# #lname#"<cfif "#fname# #lname#" is #resolution_verified_by#>selected</cfif>>#fname# #lname#</option>
  131. </cfloop>
  132. </select>
  133. </td>
  134. </tr>
  135. </table>
  136. <!--- Shows what was previously entered for Vertification Date, Current Date (for vertification date)   --->
  137. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  138. <tr>
  139. <td id="paddingformultitop">
  140. Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  141. </td>
  142. <td class="vertificationmoveinmulti">
  143. <cfloop query="serial"><input type="text" name="vertifidate_' + count + '" value="#verification_date#">&nbsp;&nbsp;</cfloop>
  144. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  145. <!---<input type="checkbox" name="currentdatevert_' + count + '" onClick=vertifidate_" + count + ".value=fill_date()>--->
  146. </td>
  147. </tr>
  148. </table>
  149.  
  150. <!--- Shows what was previously entered for Dept/Vendor Responsibility  --->
  151. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  152. <tr>
  153. <td class="red" id="paddingformultitop">
  154. Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  155. <select name="deptvendor_' + count + '">
  156. <option value="" selected>Make A Selection</option>
  157. <cfloop query="getDeptVendor">
  158. <option value="#pk_deptVendor#"<cfif #pk_deptVendor# is #dept_responsibility#>selected</cfif>>#pk_deptVendor#</option>
  159. </cfloop>
  160. </select>
  161. </td>
  162. </tr>
  163. </table>
  164.  
  165. <!--- Shows what was previously entered for RMA Data Only  --->
  166. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  167. <tr>
  168. <td id="paddingformultitop">
  169. RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;
  170. </td>
  171. <td class="rmanmoveinmulti">
  172. ( You may enter up to 500 characters. )
  173. <br/>
  174. <cfloop query="serial"><textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="rma_' + count + '" >#rma_data#</textarea></cfloop>
  175. </td>
  176. </tr>
  177. </table>
  178. <input type="hidden" name="serialcount" value="' + count + '">
  179.  
  180. <!--- Adds Delete to every ticket  --->
  181. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  182. <tr>
  183. <td>
  184. <input type="button" class="removeticket" value="Remove Serial &quot;'+count +'&quot;" onclick=\"removeElement(\'"+divIdName+"\')\"></a>
  185. </td>
  186. </td>
  187. </tr>
  188. </table>
  189.  
  190.  
  191.  
  192.  
  193.  
  194.      </div>
  195.      <input type="button" class="addticket" value="Add Serial" onClick="addInput('dynamicInput');" >
Thank you,
Rach
Sep 23 '08 #11
acoder
16,027 Expert Mod 8TB
The outer loop should be cfoutput of course.
Sep 23 '08 #12
bonneylake
769 512MB
The outer loop should be cfoutput of course.
Hey Acoder,

I put the cfoutput around what is inside the div but it still not looping through it an is still displaying everything side by side. do i do that part where i do the loop iteration and increase it by 1 to make it go into its own little sections?and if so how would i go about it?

here is what i have inside the div right now

Expand|Select|Wrap|Line Numbers
  1. <cfoutput>
  2. <table class="zpExpandedTable" id="modeltable"> 
  3. <th class="sectiontitletick" colspan="7">Serial Information <!---#count#---> </th>
  4. <tr>
  5. <td id="paddingformultitop">Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>
  6. </td>
  7. <td>
  8. <select name="modelno_' + count + '">
  9. <option value="">Make A Selection</option>
  10. <cfloop query="models">
  11. <option value="#model#"<cfif #model# is #model_no#>selected</cfif>>#model#</option>
  12. </cfloop> 
  13. </select>
  14. </td>
  15. <td>
  16. &nbsp;&nbsp;&nbsp;&nbsp;Product Type:
  17. </td>
  18. <td>
  19. <select name="producttype_' + count + '">
  20. <option value="" selected>No Choice</option>
  21. <cfloop query="getProdType">
  22. <option value="#pk_productType#"<cfif #pk_productType# is #product_type#>selected</cfif>>#pk_productType#</option> 
  23. </cfloop>
  24. </select>
  25. </td>
  26. <td class="red'">
  27. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:
  28. </td>
  29. <td>
  30. <select name="hardwarefailure_' + count + '">
  31. <option value="" selected>Make A Selection</option>
  32. <cfloop query="getHardwareFail">
  33. <option value="#pk_hardwareFailure#"<cfif #pk_hardwareFailure# is #type_hardware_failure#>selected</cfif>>#pk_hardwareFailure#</option>
  34. </cfloop>
  35. </select>
  36. </td>
  37. </tr>
  38. <table>
  39.  
  40. <!--- Shows what was previously entered for Serial Number and Software/Hardware  --->
  41. <table class="zpExpandedTable" id="modeltable">
  42. <tr>
  43. <td id="paddingformultitop">
  44. Serial Number:&nbsp;&nbsp;
  45. <cfloop query="serial"><input type="text" name="serialnum_' + count + '" value="#pka_serialNo#"></cfloop>
  46. &nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;
  47. <select name="softhardware_' + count + '">
  48. <option value="" selected>No Choice</option>
  49. <cfloop query="getSoftHard">
  50. <option value="#pk_softwareHardware#"<cfif #pk_softwareHardware# is #software_hardware#>selected</cfif>>#pk_softwareHardware#</option>
  51. </cfloop>
  52. </select>
  53. </td>
  54. </tr>
  55. </table>
  56.  
  57. <!--- Shows what was previously entered for Description ---> 
  58.  
  59. <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0">
  60. <tr>
  61. <td id="paddingformutli">
  62. Description:&nbsp;&nbsp;
  63. </td>
  64. <td class="descriptionmoveinmulti">
  65. ( You may enter up to 500 characters. )
  66. <br>
  67. <cfloop query="description"><textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="thedescription_' + count + '">#description#</textarea></cfloop> 
  68. </td>
  69. </tr>
  70. </table>
  71.  
  72. <!---Shows what was previously entered for Resolution  --->
  73.  
  74. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  75. <tr>
  76. <td id="paddingformutli">
  77. Resolution:&nbsp;&nbsp;
  78. </td>
  79. <td class="resolutionmoveinmulti">
  80. ( You may enter up to 500 characters. )
  81. <br>
  82. <cfloop query="serial"><textarea  maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="resolution_' + count + '">#resolution#</textarea></cfloop>
  83. </td>
  84. </tr>
  85. </table>
  86.  
  87. <!--- Shows what was previously entered for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
  88.  
  89. <table class="zpExpandedTable" id="resoldatetab" cellpadding="1" cellspacing="0">
  90. <tr>
  91. <td id="paddingformultitop">
  92. Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  93. </td>
  94. <td>
  95. <cfloop query="serial"><input type="text" name="resdate_' + count + '" value="#resolution_date#">&nbsp;&nbsp;</cfloop>
  96.  
  97. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  98. <!---<input type="checkbox" name="currentdateresol_' + count + '" onClick=resdate_" + count + ".value=fill_date()>--->
  99.  
  100. </td>
  101. <td>
  102. Resolution Verified as effective by:&nbsp;&nbsp;
  103. </td>
  104. <td>
  105. <select name="resvertified_' + count + '">
  106. <option value="" selected>Make A Selection</option>
  107. <cfloop query="gettech">
  108. <option value="#fname# #lname#"<cfif "#fname# #lname#" is #resolution_verified_by#>selected</cfif>>#fname# #lname#</option>
  109. </cfloop>
  110. </select>
  111. </td>
  112. </tr>
  113. </table>
  114. <!--- Shows what was previously entered for Vertification Date, Current Date (for vertification date)   --->
  115. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  116. <tr>
  117. <td id="paddingformultitop">
  118. Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  119. </td>
  120. <td class="vertificationmoveinmulti">
  121. <cfloop query="serial"><input type="text" name="vertifidate_' + count + '" value="#verification_date#">&nbsp;&nbsp;</cfloop>
  122. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  123. <!---<input type="checkbox" name="currentdatevert_' + count + '" onClick=vertifidate_" + count + ".value=fill_date()>--->
  124. </td>
  125. </tr>
  126. </table>
  127.  
  128. <!--- Shows what was previously entered for Dept/Vendor Responsibility  --->
  129. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  130. <tr>
  131. <td class="red" id="paddingformultitop">
  132. Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  133. <select name="deptvendor_' + count + '">
  134. <option value="" selected>Make A Selection</option>
  135. <cfloop query="getDeptVendor">
  136. <option value="#pk_deptVendor#"<cfif #pk_deptVendor# is #dept_responsibility#>selected</cfif>>#pk_deptVendor#</option>
  137. </cfloop>
  138. </select>
  139. </td>
  140. </tr>
  141. </table>
  142.  
  143. <!--- Shows what was previously entered for RMA Data Only  --->
  144. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  145. <tr>
  146. <td id="paddingformultitop">
  147. RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;
  148. </td>
  149. <td class="rmanmoveinmulti">
  150. ( You may enter up to 500 characters. )
  151. <br/>
  152. <cfloop query="serial"><textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="rma_' + count + '" >#rma_data#</textarea></cfloop>
  153. </td>
  154. </tr>
  155. </table>
  156. <input type="hidden" name="serialcount" value="' + count + '">
  157.  
  158. <!--- Adds Delete to every ticket  --->
  159. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  160. <tr>
  161. <td>
  162. <input type="button" class="removeticket" value="Remove Serial &quot;'+count +'&quot;" onclick=\"removeElement(\'"+divIdName+"\')\"></a>
  163. </td>
  164. </td>
  165. </tr>
  166. </table>
  167. </cfoutput>
Thank you,
Rach
Sep 23 '08 #13
bonneylake
769 512MB
Hey Acoder,

well its looping (sorta). it atleast is recognizing 3 records and make 3 separate serial information. but it i is still displaying everything side by side except in 3 seperate serial information. how do i make it so each serial has its own serial information section?

here is what i have inside the div right now

Expand|Select|Wrap|Line Numbers
  1. <cfoutput query="serial">
  2. <table class="zpExpandedTable" id="modeltable"> 
  3. <th class="sectiontitletick" colspan="7">Serial Information <!---#count# ---></th>
  4. <tr>
  5. <td id="paddingformultitop">Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>
  6. </td>
  7. <td>
  8. <select name="modelno_' + count + '">
  9. <option value="">Make A Selection</option>
  10. <cfloop query="models">
  11. <option value="#model#"<cfif #model# is #model_no#>selected</cfif>>#model#</option>
  12. </cfloop> 
  13. </select>
  14. </td>
  15. <td>
  16. &nbsp;&nbsp;&nbsp;&nbsp;Product Type:
  17. </td>
  18. <td>
  19. <select name="producttype_' + count + '">
  20. <option value="" selected>No Choice</option>
  21. <cfloop query="getProdType">
  22. <option value="#pk_productType#"<cfif #pk_productType# is #product_type#>selected</cfif>>#pk_productType#</option> 
  23. </cfloop>
  24. </select>
  25. </td>
  26. <td class="red'">
  27. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:
  28. </td>
  29. <td>
  30. <select name="hardwarefailure_' + count + '">
  31. <option value="" selected>Make A Selection</option>
  32. <cfloop query="getHardwareFail">
  33. <option value="#pk_hardwareFailure#"<cfif #pk_hardwareFailure# is #type_hardware_failure#>selected</cfif>>#pk_hardwareFailure#</option>
  34. </cfloop>
  35. </select>
  36. </td>
  37. </tr>
  38. <table>
  39.  
  40. <!--- Shows what was previously entered for Serial Number and Software/Hardware  --->
  41. <table class="zpExpandedTable" id="modeltable">
  42. <tr>
  43. <td id="paddingformultitop">
  44. Serial Number:&nbsp;&nbsp;
  45. <cfloop query="serial"><input type="text" name="serialnum_' + count + '" value="#pka_serialNo#"></cfloop>
  46. &nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;
  47. <select name="softhardware_' + count + '">
  48. <option value="" selected>No Choice</option>
  49. <cfloop query="getSoftHard">
  50. <option value="#pk_softwareHardware#"<cfif #pk_softwareHardware# is #software_hardware#>selected</cfif>>#pk_softwareHardware#</option>
  51. </cfloop>
  52. </select>
  53. </td>
  54. </tr>
  55. </table>
  56.  
  57. <!--- Shows what was previously entered for Description ---> 
  58.  
  59. <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0">
  60. <tr>
  61. <td id="paddingformutli">
  62. Description:&nbsp;&nbsp;
  63. </td>
  64. <td class="descriptionmoveinmulti">
  65. ( You may enter up to 500 characters. )
  66. <br>
  67. <cfloop query="description"><textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="thedescription_' + count + '">#description#</textarea></cfloop> 
  68. </td>
  69. </tr>
  70. </table>
  71.  
  72. <!---Shows what was previously entered for Resolution  --->
  73.  
  74. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  75. <tr>
  76. <td id="paddingformutli">
  77. Resolution:&nbsp;&nbsp;
  78. </td>
  79. <td class="resolutionmoveinmulti">
  80. ( You may enter up to 500 characters. )
  81. <br>
  82. <cfloop query="serial"><textarea  maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="resolution_' + count + '">#resolution#</textarea></cfloop>
  83. </td>
  84. </tr>
  85. </table>
  86.  
  87. <!--- Shows what was previously entered for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
  88.  
  89. <table class="zpExpandedTable" id="resoldatetab" cellpadding="1" cellspacing="0">
  90. <tr>
  91. <td id="paddingformultitop">
  92. Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  93. </td>
  94. <td>
  95. <cfloop query="serial"><input type="text" name="resdate_' + count + '" value="#resolution_date#">&nbsp;&nbsp;</cfloop>
  96.  
  97. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  98. <!---<input type="checkbox" name="currentdateresol_' + count + '" onClick=resdate_" + count + ".value=fill_date()>--->
  99.  
  100. </td>
  101. <td>
  102. Resolution Verified as effective by:&nbsp;&nbsp;
  103. </td>
  104. <td>
  105. <select name="resvertified_' + count + '">
  106. <option value="" selected>Make A Selection</option>
  107. <cfloop query="gettech">
  108. <option value="#fname# #lname#"<cfif "#fname# #lname#" is #resolution_verified_by#>selected</cfif>>#fname# #lname#</option>
  109. </cfloop>
  110. </select>
  111. </td>
  112. </tr>
  113. </table>
  114. <!--- Shows what was previously entered for Vertification Date, Current Date (for vertification date)   --->
  115. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  116. <tr>
  117. <td id="paddingformultitop">
  118. Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  119. </td>
  120. <td class="vertificationmoveinmulti">
  121. <cfloop query="serial"><input type="text" name="vertifidate_' + count + '" value="#verification_date#">&nbsp;&nbsp;</cfloop>
  122. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  123. <!---<input type="checkbox" name="currentdatevert_' + count + '" onClick=vertifidate_" + count + ".value=fill_date()>--->
  124. </td>
  125. </tr>
  126. </table>
  127.  
  128. <!--- Shows what was previously entered for Dept/Vendor Responsibility  --->
  129. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  130. <tr>
  131. <td class="red" id="paddingformultitop">
  132. Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  133. <select name="deptvendor_' + count + '">
  134. <option value="" selected>Make A Selection</option>
  135. <cfloop query="getDeptVendor">
  136. <option value="#pk_deptVendor#"<cfif #pk_deptVendor# is #dept_responsibility#>selected</cfif>>#pk_deptVendor#</option>
  137. </cfloop>
  138. </select>
  139. </td>
  140. </tr>
  141. </table>
  142.  
  143. <!--- Shows what was previously entered for RMA Data Only  --->
  144. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  145. <tr>
  146. <td id="paddingformultitop">
  147. RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;
  148. </td>
  149. <td class="rmanmoveinmulti">
  150. ( You may enter up to 500 characters. )
  151. <br/>
  152. <cfloop query="serial"><textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="rma_' + count + '" >#rma_data#</textarea></cfloop>
  153. </td>
  154. </tr>
  155. </table>
  156. <input type="hidden" name="serialcount" value="' + count + '">
  157.  
  158. <!--- Adds Delete to every ticket  --->
  159. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  160. <tr>
  161. <td>
  162. <input type="button" class="removeticket" value="Remove Serial &quot;'+count +'&quot;" onclick=\"removeElement(\'"+divIdName+"\')\"></a>
  163. </td>
  164. </td>
  165. </tr>
  166. </table>
  167. </cfoutput>
Thank you,
Rach[/quote]
Sep 23 '08 #14
acoder
16,027 Expert Mod 8TB
Does it show three "Serial Information" headers?

You can increment the #count# (set it to 1 to begin with) at the end of the loop:
Expand|Select|Wrap|Line Numbers
  1. <cfset count = count + 1>
I've not seen the CSS classes, so not sure how that affects things, but if it's showing side by side, then you could add some spacing at the bottom (end of the loop), e.g. a couple of <br> tags.
Sep 24 '08 #15
bonneylake
769 512MB
Does it show three "Serial Information" headers?

You can increment the #count# (set it to 1 to begin with) at the end of the loop:
Expand|Select|Wrap|Line Numbers
  1. <cfset count = count + 1>
I've not seen the CSS classes, so not sure how that affects things, but if it's showing side by side, then you could add some spacing at the bottom (end of the loop), e.g. a couple of <br> tags.
Hey Acoder,

Yes it shows 3 serial information headers. Just shows all the fields next to each other.

example

serial information 1

serial 1, serial 2, serial 3

serial information 2

serial 1, serial 2, serial 3

an what i am trying to do is

serial information 1

serial 1

serial information 2

serial 2

I don't think the css has to do with anything because it only makes the design (color, align center), the only thing that could affect is is the table. but do i think i need to change the table to accomplish this?

Expand|Select|Wrap|Line Numbers
  1.     <div id="dynamicInput">
  2.      <!--- All Ticket Information Appears Here--->
  3.     <!--- Shows what was previously entered for Model No, Product Type, and Type of Hardware Failure  --->
  4.  
  5. <cfoutput query="serial">
  6. <table class="zpExpandedTable" id="modeltable"> 
  7. <th class="sectiontitletick" colspan="7">
  8. Serial Information <!---#count# ---></th>
  9. <tr>
  10. <td id="paddingformultitop">Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>
  11. </td>
  12. <td>
  13. <select name="modelno_' + count + '">
  14. <option value="">Make A Selection</option>
  15. <cfloop query="models">
  16. <option value="#model#"<cfif #model# is #model_no#>selected</cfif>>#model#</option>
  17. </cfloop> 
  18. </select>
  19. </td>
  20. <td>
  21. &nbsp;&nbsp;&nbsp;&nbsp;Product Type:
  22. </td>
  23. <td>
  24. <select name="producttype_' + count + '">
  25. <option value="" selected>No Choice</option>
  26. <cfloop query="getProdType">
  27. <option value="#pk_productType#"<cfif #pk_productType# is #product_type#>selected</cfif>>#pk_productType#</option> 
  28. </cfloop>
  29. </select>
  30. </td>
  31. <td class="red'">
  32. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:
  33. </td>
  34. <td>
  35. <select name="hardwarefailure_' + count + '">
  36. <option value="" selected>Make A Selection</option>
  37. <cfloop query="getHardwareFail">
  38. <option value="#pk_hardwareFailure#"<cfif #pk_hardwareFailure# is #type_hardware_failure#>selected</cfif>>#pk_hardwareFailure#</option>
  39. </cfloop>
  40. </select>
  41. </td>
  42. </tr>
  43. <table>
  44.  
  45. <!--- Shows what was previously entered for Serial Number and Software/Hardware  --->
  46. <table class="zpExpandedTable" id="modeltable">
  47. <tr>
  48. <td id="paddingformultitop">
  49. Serial Number:&nbsp;&nbsp;
  50. <cfloop query="serial" ><input type="text" name="serialnum_' + count + '" value="#pka_serialNo#"></cfloop>
  51. &nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;
  52. <select name="softhardware_' + count + '">
  53. <option value="" selected>No Choice</option>
  54. <cfloop query="getSoftHard">
  55. <option value="#pk_softwareHardware#"<cfif #pk_softwareHardware# is #software_hardware#>selected</cfif>>#pk_softwareHardware#</option>
  56. </cfloop>
  57. </select>
  58. </td>
  59. </tr>
  60. </table>
  61.  
  62. <!--- Shows what was previously entered for Description ---> 
  63.  
  64. <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0">
  65. <tr>
  66. <td id="paddingformutli">
  67. Description:&nbsp;&nbsp;
  68. </td>
  69. <td class="descriptionmoveinmulti">
  70. ( You may enter up to 500 characters. )
  71. <br>
  72. <cfloop query="description"><textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="thedescription_' + count + '">#description#</textarea></cfloop> 
  73. </td>
  74. </tr>
  75. </table>
  76.  
  77. <!---Shows what was previously entered for Resolution  --->
  78.  
  79. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  80. <tr>
  81. <td id="paddingformutli">
  82. Resolution:&nbsp;&nbsp;
  83. </td>
  84. <td class="resolutionmoveinmulti">
  85. ( You may enter up to 500 characters. )
  86. <br>
  87. <cfloop query="serial"><textarea  maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="resolution_' + count + '">#resolution#</textarea></cfloop>
  88. </td>
  89. </tr>
  90. </table>
  91.  
  92. <!--- Shows what was previously entered for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
  93.  
  94. <table class="zpExpandedTable" id="resoldatetab" cellpadding="1" cellspacing="0">
  95. <tr>
  96. <td id="paddingformultitop">
  97. Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  98. </td>
  99. <td>
  100. <cfloop query="serial"><input type="text" name="resdate_' + count + '" value="#resolution_date#">&nbsp;&nbsp;</cfloop>
  101.  
  102. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  103. <!---<input type="checkbox" name="currentdateresol_' + count + '" onClick=resdate_" + count + ".value=fill_date()>--->
  104.  
  105. </td>
  106. <td>
  107. Resolution Verified as effective by:&nbsp;&nbsp;
  108. </td>
  109. <td>
  110. <select name="resvertified_' + count + '">
  111. <option value="" selected>Make A Selection</option>
  112. <cfloop query="gettech">
  113. <option value="#fname# #lname#"<cfif "#fname# #lname#" is #resolution_verified_by#>selected</cfif>>#fname# #lname#</option>
  114. </cfloop>
  115. </select>
  116. </td>
  117. </tr>
  118. </table>
  119. <!--- Shows what was previously entered for Vertification Date, Current Date (for vertification date)   --->
  120. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  121. <tr>
  122. <td id="paddingformultitop">
  123. Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  124. </td>
  125. <td class="vertificationmoveinmulti">
  126. <cfloop query="serial"><input type="text" name="vertifidate_' + count + '" value="#verification_date#">&nbsp;&nbsp;</cfloop>
  127. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  128. <!---<input type="checkbox" name="currentdatevert_' + count + '" onClick=vertifidate_" + count + ".value=fill_date()>--->
  129. </td>
  130. </tr>
  131. </table>
  132.  
  133. <!--- Shows what was previously entered for Dept/Vendor Responsibility  --->
  134. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  135. <tr>
  136. <td class="red" id="paddingformultitop">
  137. Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  138. <select name="deptvendor_' + count + '">
  139. <option value="" selected>Make A Selection</option>
  140. <cfloop query="getDeptVendor">
  141. <option value="#pk_deptVendor#"<cfif #pk_deptVendor# is #dept_responsibility#>selected</cfif>>#pk_deptVendor#</option>
  142. </cfloop>
  143. </select>
  144. </td>
  145. </tr>
  146. </table>
  147.  
  148. <!--- Shows what was previously entered for RMA Data Only  --->
  149. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  150. <tr>
  151. <td id="paddingformultitop">
  152. RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;
  153. </td>
  154. <td class="rmanmoveinmulti">
  155. ( You may enter up to 500 characters. )
  156. <br/>
  157. <cfloop query="serial"><textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="rma_' + count + '" >#rma_data#</textarea></cfloop>
  158. </td>
  159. </tr>
  160. </table>
  161. <input type="hidden" name="serialcount" value="' + count + '">
  162.  
  163. <!--- Adds Delete to every ticket  --->
  164. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  165. <tr>
  166. <td>
  167. <!---<input type="button" class="removeticket" value="Remove Serial &quot;'+count +'&quot;" onclick=\"removeElement(\'"+divIdName+"\')\">--->
  168. </td>
  169. </td>
  170. </tr>
  171. </table>
  172. </cfoutput>
  173.  
  174.      </div>
also wanted to ask the way am doing it, is it going to have a problem with the count? because original the way it keeps count of everything added and deleted was using the javascript. an i am afraid of is if i have a serial information 1 in the div and i go an add a serial and its called serial information 1 that it will get over written instead of keeping the original serial information 1 and adding the other serial information 1. Hope that makes since mostly worried about the count an how that will work since now its not in the javascript.

Thank you for all the help,
Rach
Sep 24 '08 #16
acoder
16,027 Expert Mod 8TB
Within the code you have <cfloop query="serial"> This is the cause of the problem. It's looping within the loop. Remove the "serial" loops. You can keep the rest because they're just populating drop downs, etc., though you could probably have it grab the output in variable and output that instead of looping over the same queries over and over again.

As for the JavaScript, that can be solved by outputting the Coldfusion count variable within the JavaScript code.
Sep 24 '08 #17
bonneylake
769 512MB
Hey Acoder,

Yep that works, can't believe i didn't notice it! But ok so how do i output the coldfusion count variable within the javascript code?

Thank you :),
Rach
Sep 24 '08 #18
acoder
16,027 Expert Mod 8TB
Something as simple as
Expand|Select|Wrap|Line Numbers
  1. var count = <cfoutput>#count#</cfoutput>;
This assumes that the count value in Coldfusion is correct, of course.
Sep 24 '08 #19
bonneylake
769 512MB
Something as simple as
Expand|Select|Wrap|Line Numbers
  1. var count = <cfoutput>#count#</cfoutput>;
This assumes that the count value in Coldfusion is correct, of course.
Hey Acoder,

Ok so me and count are not getting along so well (havent added what you added above just yet). But i get the error of Error resolving parameter COUNT here is what i have tried

Expand|Select|Wrap|Line Numbers
  1. <div id="dynamicInput">
  2.      <!--- All Ticket Information Appears Here--->
  3.     <!--- Shows what was previously entered for Model No, Product Type, and Type of Hardware Failure  --->
  4.  
  5.  
  6. <cfset count = count + 1>
  7. <cfoutput query="serial">
  8.  
  9. <cfset model_no = #model_no#>
  10. <cfset product_type = #product_type#>
  11. <cfset type_hardware_failure = #type_hardware_failure#>
  12. <cfset software_hardware = #software_hardware#>
  13. <cfset resolution_verified_by = #resolution_verified_by#>
  14. <cfset dept_responsibility = #dept_responsibility#>
  15. <table class="zpExpandedTable" id="modeltable"> 
  16. <th class="sectiontitletick" colspan="7">
  17. Serial Information #count# </th>
  18. <tr>
Do i need to do something like <cfset count = 0> before the cfset you have?

Thank you,
Rach
Sep 24 '08 #20
acoder
16,027 Expert Mod 8TB
Yes, count will have to be set to 0 or 1 to begin with.
Sep 24 '08 #21
bonneylake
769 512MB
Yes, count will have to be set to 0 or 1 to begin with.
Hey Acoder,

Ok with the count it keeps giving me the same number. Here is what i have

Expand|Select|Wrap|Line Numbers
  1. <cfset count = 1>
  2. <cfset count = count + 1>
It keeps giving me right now serial information 2, serial information 2, serial information 2. any ideas?

Thank you,
Rach
Sep 24 '08 #22
acoder
16,027 Expert Mod 8TB
The count needs to be incremented within the loop.
Sep 24 '08 #23
bonneylake
769 512MB
The count needs to be incremented within the loop.
Hey Acoder,

Do i need to create its own loop for it? because here is what i have

Expand|Select|Wrap|Line Numbers
  1. <cfoutput query="serial">
  2.  
  3. <cfset model_no = #model_no#>
  4. <cfset product_type = #product_type#>
  5. <cfset type_hardware_failure = #type_hardware_failure#>
  6. <cfset software_hardware = #software_hardware#>
  7. <cfset resolution_verified_by = #resolution_verified_by#>
  8. <cfset dept_responsibility = #dept_responsibility#>
  9. <table class="zpExpandedTable" id="modeltable"> 
  10. <th class="sectiontitletick" colspan="7"><cfset count = 1>
  11. <cfset count = count + 1>
  12. Serial Information #count# </th>
  13. <tr>
  14. <td id="paddingformultitop">Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>
Thank you,
Rach
Sep 24 '08 #24
acoder
16,027 Expert Mod 8TB
The first cfset which sets the initial value should be outside the loop. The incrementing within the loop.
Sep 24 '08 #25
bonneylake
769 512MB
The first cfset which sets the initial value should be outside the loop. The incrementing within the loop.
Hey Acoder,

Its counting correctly, but where do i put the
Expand|Select|Wrap|Line Numbers
  1. var count = <cfoutput>#count#</cfoutput>; 
part?

This is where i had put it, but it says Error resolving parameter COUNT

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2.  <!---Allows us to add serial information multiple times --->
  3. function addInput(divName){
  4. var dynamic = document.getElementById('dynamicInput');
  5. var thevalue = document.getElementById('theValue');
  6. var count = (document.getElementById('theValue').value -1)+ 2;
  7. thevalue.value = count;
  8. var count = <cfoutput>#count#</cfoutput>;
  9. var newdiv = document.createElement('div');
  10. var divIdName = 'dynamic'+count+'Input';
  11. newdiv.setAttribute('id',divIdName);
Thank you,
Rach
Sep 24 '08 #26
acoder
16,027 Expert Mod 8TB
It'd have to be after the count has been set, so you could have a script that sets the count after the div, e.g.
Expand|Select|Wrap|Line Numbers
  1. </div>
  2. <script type="text/javascript">
  3. var count = <cfoutput>#count</cfoutput>;
  4. </script>
This is probably not best practice if you want to keep JavaScript code in the head in which case you can use cfhtmlhead.
Sep 24 '08 #27
bonneylake
769 512MB
It'd have to be after the count has been set, so you could have a script that sets the count after the div, e.g.
Expand|Select|Wrap|Line Numbers
  1. </div>
  2. <script type="text/javascript">
  3. var count = <cfoutput>#count</cfoutput>;
  4. </script>
This is probably not best practice if you want to keep JavaScript code in the head in which case you can use cfhtmlhead.
Hey Acoder

it really aint working like it needs to doing it that way. What it does is if i have 2 serials. serial information 1 serial information 2. if i add another serial it changes the serial information 2 to a serial information 1. an if i add another it does this

serial information 1
serial information 1
serial information 2
serial information 2

its just not counting right, would adding into the javascript help? an what would i need to change to add it to the javascript?

Thank you,
Rach
Sep 24 '08 #28
acoder
16,027 Expert Mod 8TB
Can you show the current version of your code?
Sep 24 '08 #29
bonneylake
769 512MB
Can you show the current version of your code?
Hey Acoder,

Ok here is the div part

Expand|Select|Wrap|Line Numbers
  1. <input type="hidden" value="0" id="theValue" />
  2.      <div id="dynamicInput">
  3.      <!--- All Ticket Information Appears Here--->
  4.     <!--- Shows what was previously entered for Model No, Product Type, and Type of Hardware Failure  --->
  5.  
  6. <cfset count = 0>
  7. <cfoutput query="serial">
  8.  
  9. <cfset model_no = #model_no#>
  10. <cfset product_type = #product_type#>
  11. <cfset type_hardware_failure = #type_hardware_failure#>
  12. <cfset software_hardware = #software_hardware#>
  13. <cfset resolution_verified_by = #resolution_verified_by#>
  14. <cfset dept_responsibility = #dept_responsibility#>
  15. <table class="zpExpandedTable" id="modeltable"> 
  16. <th class="sectiontitletick" colspan="7">
  17. <cfset count = count + 1>
  18. Serial Information #count# </th>
  19. <tr>
  20. <td id="paddingformultitop">Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>
  21. </td>
  22. <td>
  23. <select name="modelno_' + count + '">
  24. <option value="">Make A Selection</option>
  25. <cfloop query="models">
  26. <option value="#model#"<cfif #model# is #model_no#>selected</cfif>>#model#</option>
  27. </cfloop> 
  28. </select>
  29. </td>
  30. <td>
  31. &nbsp;&nbsp;&nbsp;&nbsp;Product Type:
  32. </td>
  33. <td>
  34. <select name="producttype_' + count + '">
  35. <option value="" selected>No Choice</option>
  36. <cfloop query="getProdType">
  37. <option value="#pk_productType#"<cfif #pk_productType# is #product_type#>selected</cfif>>#pk_productType#</option> 
  38. </cfloop>
  39. </select>
  40. </td>
  41. <td class="red'">
  42. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:
  43. </td>
  44. <td>
  45. <select name="hardwarefailure_' + count + '">
  46. <option value="" selected>Make A Selection</option>
  47. <cfloop query="getHardwareFail">
  48. <option value="#pk_hardwareFailure#"<cfif #pk_hardwareFailure# is #type_hardware_failure#>selected</cfif>>#pk_hardwareFailure#</option>
  49. </cfloop>
  50. </select>
  51. </td>
  52. </tr>
  53. <table>
  54.  
  55. <!--- Shows what was previously entered for Serial Number and Software/Hardware  --->
  56. <table class="zpExpandedTable" id="modeltable">
  57. <tr>
  58. <td id="paddingformultitop">
  59. Serial Number:&nbsp;&nbsp;
  60. <input type="text" name="serialnum_' + count + '" value="#pka_serialNo#">
  61. &nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;
  62. <select name="softhardware_' + count + '">
  63. <option value="" selected>No Choice</option>
  64. <cfloop query="getSoftHard">
  65. <option value="#pk_softwareHardware#"<cfif #pk_softwareHardware# is #software_hardware#>selected</cfif>>#pk_softwareHardware#</option>
  66. </cfloop>
  67. </select>
  68. </td>
  69. </tr>
  70. </table>
  71.  
  72. <!--- Shows what was previously entered for Description ---> 
  73.  
  74. <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0">
  75. <tr>
  76. <td id="paddingformutli">
  77. Description:&nbsp;&nbsp;
  78. </td>
  79. <td class="descriptionmoveinmulti">
  80. ( You may enter up to 500 characters. )
  81. <br>
  82. <cfloop query="description"><textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="thedescription_' + count + '">#description#</textarea></cfloop> 
  83. </td>
  84. </tr>
  85. </table>
  86.  
  87. <!---Shows what was previously entered for Resolution  --->
  88.  
  89. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  90. <tr>
  91. <td id="paddingformutli">
  92. Resolution:&nbsp;&nbsp;
  93. </td>
  94. <td class="resolutionmoveinmulti">
  95. ( You may enter up to 500 characters. )
  96. <br>
  97. <textarea  maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="resolution_' + count + '">#resolution#</textarea>
  98. </td>
  99. </tr>
  100. </table>
  101.  
  102. <!--- Shows what was previously entered for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
  103.  
  104. <table class="zpExpandedTable" id="resoldatetab" cellpadding="1" cellspacing="0">
  105. <tr>
  106. <td id="paddingformultitop">
  107. Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  108. </td>
  109. <td>
  110. <input type="text" name="resdate_' + count + '" value="#resolution_date#">&nbsp;&nbsp;
  111.  
  112. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  113. <!---<input type="checkbox" name="currentdateresol_' + count + '" onClick=resdate_" + count + ".value=fill_date()>--->
  114.  
  115. </td>
  116. <td>
  117. Resolution Verified as effective by:&nbsp;&nbsp;
  118. </td>
  119. <td>
  120. <select name="resvertified_' + count + '">
  121. <option value="" selected>Make A Selection</option>
  122. <cfloop query="gettech">
  123. <option value="#fname# #lname#"<cfif "#fname# #lname#" is #resolution_verified_by#>selected</cfif>>#fname# #lname#</option>
  124. </cfloop>
  125. </select>
  126. </td>
  127. </tr>
  128. </table>
  129. <!--- Shows what was previously entered for Vertification Date, Current Date (for vertification date)   --->
  130. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  131. <tr>
  132. <td id="paddingformultitop">
  133. Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  134. </td>
  135. <td class="vertificationmoveinmulti">
  136. <input type="text" name="vertifidate_' + count + '" value="#verification_date#">&nbsp;&nbsp;
  137. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  138. <!---<input type="checkbox" name="currentdatevert_' + count + '" onClick=vertifidate_" + count + ".value=fill_date()>--->
  139. </td>
  140. </tr>
  141. </table>
  142.  
  143. <!--- Shows what was previously entered for Dept/Vendor Responsibility  --->
  144. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  145. <tr>
  146. <td class="red" id="paddingformultitop">
  147. Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  148. <select name="deptvendor_' + count + '">
  149. <option value="" selected>Make A Selection</option>
  150. <cfloop query="getDeptVendor">
  151. <option value="#pk_deptVendor#"<cfif #pk_deptVendor# is #dept_responsibility#>selected</cfif>>#pk_deptVendor#</option>
  152. </cfloop>
  153. </select>
  154. </td>
  155. </tr>
  156. </table>
  157.  
  158. <!--- Shows what was previously entered for RMA Data Only  --->
  159. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  160. <tr>
  161. <td id="paddingformultitop">
  162. RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;
  163. </td>
  164. <td class="rmanmoveinmulti">
  165. ( You may enter up to 500 characters. )
  166. <br/>
  167. <textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="rma_' + count + '" >#rma_data#</textarea>
  168. </td>
  169. </tr>
  170. </table>
  171. <input type="hidden" name="serialcount" value="' + count + '">
  172.  
  173. <!--- Adds Delete to every ticket  --->
  174. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  175. <tr>
  176. <td>
  177. <!---<input type="button" class="removeticket" value="Remove Serial &quot;'+count +'&quot;" onclick=\"removeElement(\'"+divIdName+"\')\">--->
  178. </td>
  179. </tr>
  180. </table>
  181.  
  182.      </div>
  183. </cfoutput>
  184.      <script type="text/javascript">
  185. var count = <cfoutput>#count#</cfoutput>
  186. </script>
  187.      <input type="button" class="addticket" value="Add Serial" onClick="addInput('dynamicInput');" >




an here is the javascript part

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2.  
  3.  
  4.  <!---Allows us to add serial information multiple times --->
  5. function addInput(divName){
  6. var dynamic = document.getElementById('dynamicInput');
  7. var thevalue = document.getElementById('theValue');
  8. var count = (document.getElementById('theValue').value -1)+ 2;
  9. thevalue.value = count;
  10. var newdiv = document.createElement('div');
  11. var divIdName = 'dynamic'+count+'Input';
  12. newdiv.setAttribute('id',divIdName);
  13.  
  14. <!--- Adds Extra fields for Model No, Product Type, and Type of Hardware Failure  --->
  15. newdiv.innerHTML =
  16. "<table class='zpExpandedTable' id='modeltable'>" +
  17. "<th class='sectiontitletick' colspan='7'>Serial Information "+ count +" </th>" +
  18. "<tr>" +
  19. "<td id='paddingformultitop'>Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>" +
  20. "</td>" +
  21. "<td>" +
  22.  "<select name='modelno_" + count + "' >" +
  23.  "<option value=''>Make A Selection</option>" +
  24. "<cfoutput query='models'>" + 
  25. "<option value='#model#'>#model#</option>" + 
  26. "</cfoutput>" + 
  27.  "</select>" +
  28.  "</td>" +
  29.  "<td>" +
  30. "&nbsp;&nbsp;&nbsp;&nbsp;Product Type:"  +
  31. "</td>" +
  32. "<td>" +
  33. "<select name='producttype_" + count + "'>" +
  34. "<option value='' selected>No Choice</option>" +
  35. "<cfoutput query='getProdType'>" + 
  36. "<option value='#pk_productType#'>#pk_productType#</option>" + 
  37. "</cfoutput>" + 
  38. "</select>" +
  39. "</td>" +
  40. "<td class='red'>" +
  41. "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:" +
  42. "</td>" +
  43. "<td>" +
  44. "<select name='hardwarefailure_" + count + "'>" +
  45. "<option value='' selected>Make A Selection</option>" +
  46. "<cfoutput query='getHardwareFail'>" +
  47. "<option value='#pk_hardwareFailure#'>#pk_hardwareFailure#</option>" +
  48. "</cfoutput>" +
  49. "</select>" +
  50. "</td>" +
  51. "</tr>" +
  52. "<table>";
  53.  
  54. <!--- Adds Extra fields for Serial Number and Software/Hardware  --->
  55. newdiv.innerHTML = newdiv.innerHTML +
  56. "<table class='zpExpandedTable' id='modeltable'>" +
  57. "<tr>" +
  58. "<td id='paddingformultitop'>" +
  59. "Serial Number:&nbsp;&nbsp;" +
  60. "<input type='text' name='serialnum_" + count + "'>" +
  61. "&nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;" +
  62. "<select name='softhardware_" + count + "'>" +
  63. "<option value='' selected>No Choice</option>" +
  64. "<cfoutput query='getSoftHard'>" + 
  65. "<option value='#pk_softwareHardware#'>#pk_softwareHardware#</option>" + 
  66. "</cfoutput>" + 
  67. "</select>" +
  68. "</td>" +
  69. "</tr>" +
  70. "</table>";
  71.  
  72. <!--- Adds Extra fields for Description  --->
  73. newdiv.innerHTML = newdiv.innerHTML + 
  74. "<table class='zpExpandedTable' id='resoltable' cellpadding='3' cellspacing='0'>" +
  75. "<tr>" +
  76. "<td id='paddingformutli'>" +
  77. "Description:&nbsp;&nbsp;" + 
  78. "</td>" +
  79. "<td class='descriptionmoveinmulti'>" +
  80. "( You may enter up to 500 characters. )"+
  81. "<br>" +
  82. "<textarea maxlength='500' onkeyup='return ismaxlength(this)' onkeydown='return ismaxlength(this)'rows='4' cols='60' name='thedescription_" + count + "'></textarea>" + 
  83. "</td>" +
  84. "</tr>" +
  85. "</table>";
  86.  
  87. <!--- Adds Extra fields for Resolution  --->
  88. newdiv.innerHTML = newdiv.innerHTML +
  89. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  90. "<tr>" +
  91. "<td id='paddingformutli'>" +
  92. "Resolution:&nbsp;&nbsp;" +
  93. "</td>" +
  94. "<td class='resolutionmoveinmulti'>" +
  95. "( You may enter up to 500 characters. )"+
  96. "<br>" +
  97. "<textarea  maxlength='500' onkeyup='return ismaxlength(this)' onkeydown='return ismaxlength(this)' rows='4' cols='60' name='resolution_" + count + "'></textarea>" +
  98. "</td>" +
  99. "</tr>" +
  100. "</table>";
  101.  
  102. <!--- Adds Extra fields for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
  103. newdiv.innerHTML = newdiv.innerHTML +
  104. "<table class='zpExpandedTable' id='resoldatetab' cellpadding='1' cellspacing='0'>" +
  105. "<tr>" +
  106. "<td id='paddingformultitop'>" +
  107. "Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;" +
  108. "</td>" +
  109. "<td>" +
  110. "<input type='text' name='resdate_" + count + "' value=''  >&nbsp;&nbsp;" +
  111.  
  112. "&nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;" +
  113. "<input type='checkbox' name='currentdateresol_" + count + "' onClick=resdate_" + count + ".value=fill_date()>" +
  114. "</td>" +
  115. "<td>" +
  116.  
  117. "Resolution Verified as effective by:&nbsp;&nbsp;"  +
  118. "</td>" +
  119. "<td>" +
  120. "<select name='resvertified_" + count + "'>" +
  121. "<option value='' selected>Make A Selection</option>" +
  122. "<cfoutput query='gettech'><option value='#fname# #lname#'>#fname# #lname#</option></cfoutput></select>" +
  123. "</td>" +
  124. "</tr>" +
  125. "</table>";
  126.  
  127. <!--- Adds Extra fields for Vertification Date, Current Date (for vertification date) and resolution vertified as effective by  --->
  128. newdiv.innerHTML = newdiv.innerHTML +
  129. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  130. "<tr>" +
  131. "<td id='paddingformultitop'>" +
  132. "Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;" +
  133. "</td>" +
  134. "<td class='vertificationmoveinmulti'>" +
  135. "<input type='text' name='vertifidate_" + count + "'>&nbsp;&nbsp;" +
  136. "&nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;" +
  137. "<input type='checkbox' name='currentdatevert_" + count + "' onClick=vertifidate_" + count + ".value=fill_date()>" +
  138. "</td>" +
  139. "</tr>" +
  140. "</table>";
  141.  
  142. <!--- Adds Extra fields for Dept/Vendor Responsibility  --->
  143. newdiv.innerHTML = newdiv.innerHTML +
  144. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  145. "<tr>" +
  146. "<td class='red' id='paddingformultitop'>" +
  147. "Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"  +
  148. "<select name='deptvendor_" + count + "'>" +
  149. "<option value='' selected>Make A Selection</option>" +
  150. "<cfoutput query='getDeptVendor'>" +
  151. "<option value='#pk_deptVendor#'>#pk_deptVendor#</option>" +
  152. " </cfoutput>" +
  153. "</select>" +
  154. "</td>" +
  155. "</tr>" +
  156. "</table>";
  157.  
  158. <!--- Adds Extra fields for RMA Data Only  --->
  159. newdiv.innerHTML = newdiv.innerHTML +
  160. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  161. "<tr>" +
  162. "<td id='paddingformultitop'>" +
  163. "RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;" +
  164. "</td>" +
  165. "<td class='rmanmoveinmulti'>" +
  166. "( You may enter up to 500 characters. )"+
  167. "<br/>" +
  168. "<textarea maxlength='500' onkeyup='return ismaxlength(this)' onkeydown='return ismaxlength(this)' rows='4' cols='60' name='rma_" + count + "'></textarea> " +
  169. "</td>" +
  170. "</tr>" +
  171. "</table>" +
  172. "<input type='hidden' name='serialcount' value='" + count + "'>";
  173.  
  174. <!--- Adds Delete to every ticket  --->
  175. newdiv.innerHTML = newdiv.innerHTML +
  176. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  177. "<tr>" +
  178. "<td>" +
  179. "<input type='button' class='removeticket' value='Remove Serial &quot;"+count +"&quot;' onclick=\"removeElement(\'"+divIdName+"\')\"></a>" +
  180. "</td>" +
  181. "</td>" +
  182. "</tr>" +
  183. "</table>";
  184.  
  185. document.getElementById(divName).appendChild(newdiv);
  186.  
  187.  
  188. <!---Allows us to remove multiple fields --->
  189. function removeElement(divNum) {
  190.   var d = document.getElementById('dynamicInput');
  191.   var olddiv = document.getElementById(divNum);
  192.   d.removeChild(olddiv);
  193. }
  194.  
  195. </script>
Thank you,
Rach
Sep 24 '08 #30
acoder
16,027 Expert Mod 8TB
Ah, I see you use the "theValue" hidden input for the count. In that case instead of setting a global variable, set the hidden variable and you can set it directly without using javascript:
Expand|Select|Wrap|Line Numbers
  1. <input type="hidden" value="#count#" id="theValue" />
Sep 24 '08 #31
bonneylake
769 512MB
Ah, I see you use the "theValue" hidden input for the count. In that case instead of setting a global variable, set the hidden variable and you can set it directly without using javascript:
Expand|Select|Wrap|Line Numbers
  1. <input type="hidden" value="#count#" id="theValue" />
Hey Acoder,

I am still running into the same problem. I bolded where i added it at an have not messed with the javascript.

Expand|Select|Wrap|Line Numbers
  1. <input type="hidden" value="0" id="theValue" />
  2.      <div id="dynamicInput">
  3.      <!--- All Ticket Information Appears Here--->
  4.     <!--- Shows what was previously entered for Model No, Product Type, and Type of Hardware Failure  --->
  5.  
  6. <cfset count = 0>
  7. <cfoutput query="serial">
  8. <cfset model_no = #model_no#>
  9. <cfset product_type = #product_type#>
  10. <cfset type_hardware_failure = #type_hardware_failure#>
  11. <cfset software_hardware = #software_hardware#>
  12. <cfset resolution_verified_by = #resolution_verified_by#>
  13. <cfset dept_responsibility = #dept_responsibility#>
  14. <table class="zpExpandedTable" id="modeltable"> 
  15. <th class="sectiontitletick" colspan="7">
  16. <cfset count = count + 1>
  17. Serial Information #count# </th>
  18. <tr>
  19. <td id="paddingformultitop">Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>
  20. </td>
  21. <td>
  22. <select name="modelno_' + count + '">
  23. <option value="">Make A Selection</option>
  24. <cfloop query="models">
  25. <option value="#model#"<cfif #model# is #model_no#>selected</cfif>>#model#</option>
  26. </cfloop> 
  27. </select>
  28. </td>
  29. <td>
  30. &nbsp;&nbsp;&nbsp;&nbsp;Product Type:
  31. </td>
  32. <td>
  33. <select name="producttype_' + count + '">
  34. <option value="" selected>No Choice</option>
  35. <cfloop query="getProdType">
  36. <option value="#pk_productType#"<cfif #pk_productType# is #product_type#>selected</cfif>>#pk_productType#</option> 
  37. </cfloop>
  38. </select>
  39. </td>
  40. <td class="red'">
  41. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:
  42. </td>
  43. <td>
  44. <select name="hardwarefailure_' + count + '">
  45. <option value="" selected>Make A Selection</option>
  46. <cfloop query="getHardwareFail">
  47. <option value="#pk_hardwareFailure#"<cfif #pk_hardwareFailure# is #type_hardware_failure#>selected</cfif>>#pk_hardwareFailure#</option>
  48. </cfloop>
  49. </select>
  50. </td>
  51. </tr>
  52. <table>
  53.  
  54. <!--- Shows what was previously entered for Serial Number and Software/Hardware  --->
  55. <table class="zpExpandedTable" id="modeltable">
  56. <tr>
  57. <td id="paddingformultitop">
  58. Serial Number:&nbsp;&nbsp;
  59. <input type="text" name="serialnum_' + count + '" value="#pka_serialNo#">
  60. &nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;
  61. <select name="softhardware_' + count + '">
  62. <option value="" selected>No Choice</option>
  63. <cfloop query="getSoftHard">
  64. <option value="#pk_softwareHardware#"<cfif #pk_softwareHardware# is #software_hardware#>selected</cfif>>#pk_softwareHardware#</option>
  65. </cfloop>
  66. </select>
  67. </td>
  68. </tr>
  69. </table>
  70.  
  71. <!--- Shows what was previously entered for Description ---> 
  72.  
  73. <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0">
  74. <tr>
  75. <td id="paddingformutli">
  76. Description:&nbsp;&nbsp;
  77. </td>
  78. <td class="descriptionmoveinmulti">
  79. ( You may enter up to 500 characters. )
  80. <br>
  81. <cfloop query="description"><textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="thedescription_' + count + '">#description#</textarea></cfloop> 
  82. </td>
  83. </tr>
  84. </table>
  85.  
  86. <!---Shows what was previously entered for Resolution  --->
  87.  
  88. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  89. <tr>
  90. <td id="paddingformutli">
  91. Resolution:&nbsp;&nbsp;
  92. </td>
  93. <td class="resolutionmoveinmulti">
  94. ( You may enter up to 500 characters. )
  95. <br>
  96. <textarea  maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="resolution_' + count + '">#resolution#</textarea>
  97. </td>
  98. </tr>
  99. </table>
  100.  
  101. <!--- Shows what was previously entered for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
  102.  
  103. <table class="zpExpandedTable" id="resoldatetab" cellpadding="1" cellspacing="0">
  104. <tr>
  105. <td id="paddingformultitop">
  106. Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  107. </td>
  108. <td>
  109. <input type="text" name="resdate_' + count + '" value="#resolution_date#">&nbsp;&nbsp;
  110.  
  111. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  112. <!---<input type="checkbox" name="currentdateresol_' + count + '" onClick=resdate_" + count + ".value=fill_date()>--->
  113.  
  114. </td>
  115. <td>
  116. Resolution Verified as effective by:&nbsp;&nbsp;
  117. </td>
  118. <td>
  119. <select name="resvertified_' + count + '">
  120. <option value="" selected>Make A Selection</option>
  121. <cfloop query="gettech">
  122. <option value="#fname# #lname#"<cfif "#fname# #lname#" is #resolution_verified_by#>selected</cfif>>#fname# #lname#</option>
  123. </cfloop>
  124. </select>
  125. </td>
  126. </tr>
  127. </table>
  128. <!--- Shows what was previously entered for Vertification Date, Current Date (for vertification date)   --->
  129. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  130. <tr>
  131. <td id="paddingformultitop">
  132. Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  133. </td>
  134. <td class="vertificationmoveinmulti">
  135. <input type="text" name="vertifidate_' + count + '" value="#verification_date#">&nbsp;&nbsp;
  136. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  137. <!---<input type="checkbox" name="currentdatevert_' + count + '" onClick=vertifidate_" + count + ".value=fill_date()>--->
  138. </td>
  139. </tr>
  140. </table>
  141.  
  142. <!--- Shows what was previously entered for Dept/Vendor Responsibility  --->
  143. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  144. <tr>
  145. <td class="red" id="paddingformultitop">
  146. Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  147. <select name="deptvendor_' + count + '">
  148. <option value="" selected>Make A Selection</option>
  149. <cfloop query="getDeptVendor">
  150. <option value="#pk_deptVendor#"<cfif #pk_deptVendor# is #dept_responsibility#>selected</cfif>>#pk_deptVendor#</option>
  151. </cfloop>
  152. </select>
  153. </td>
  154. </tr>
  155. </table>
  156.  
  157. <!--- Shows what was previously entered for RMA Data Only  --->
  158. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  159. <tr>
  160. <td id="paddingformultitop">
  161. RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;
  162. </td>
  163. <td class="rmanmoveinmulti">
  164. ( You may enter up to 500 characters. )
  165. <br/>
  166. <textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="rma_' + count + '" >#rma_data#</textarea>
  167. </td>
  168. </tr>
  169. </table><input type="hidden" value="#count#" id="theValue" />
  170. <input type="hidden" name="serialcount" value="' + count + '">
  171.  
  172. <!--- Adds Delete to every ticket  --->
  173. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  174. <tr>
  175. <td>
  176. <!---<input type="button" class="removeticket" value="Remove Serial &quot;'+count +'&quot;" onclick=\"removeElement(\'"+divIdName+"\')\">--->
  177. </td>
  178. </tr>
  179. </table>
  180.  
  181.      </div>
  182. </cfoutput>
  183.      <input type="button" class="addticket" value="Add Serial" onClick="addInput('dynamicInput');" >
Thank you,
Rach
Sep 24 '08 #32
acoder
16,027 Expert Mod 8TB
The first thing to check is that it's within cfoutput. Also don't forget to remove the first line which has a duplicate (now no longer needed).
Sep 24 '08 #33
bonneylake
769 512MB
The first thing to check is that it's within cfoutput. Also don't forget to remove the first line which has a duplicate (now no longer needed).
Hey Acoder,

Well taking out the first line the value part seemed to help the count better. If i have one previously serial it seems to work perfectly the count. But if have more the one is when i run into problems. If i have serial 1 and serial 2 if i go to add another it makes it serial 2. But new line is within the cfouput. But here is what i have

Expand|Select|Wrap|Line Numbers
  1. <!--- Ticket Information 
  2.        This display the ticket Information--->
  3.  
  4. <!---<input type="hidden" value="0" id="theValue" />--->
  5.      <div id="dynamicInput">
  6.      <!--- All Ticket Information Appears Here--->
  7.     <!--- Shows what was previously entered for Model No, Product Type, and Type of Hardware Failure  --->
  8.  
  9. <cfset count = 0>
  10. <cfoutput query="serial">
  11. <cfset model_no = #model_no#>
  12. <cfset product_type = #product_type#>
  13. <cfset type_hardware_failure = #type_hardware_failure#>
  14. <cfset software_hardware = #software_hardware#>
  15. <cfset resolution_verified_by = #resolution_verified_by#>
  16. <cfset dept_responsibility = #dept_responsibility#>
  17. <table class="zpExpandedTable" id="modeltable"> 
  18. <th class="sectiontitletick" colspan="7">
  19. <cfset count = count + 1>
  20. Serial Information #count# </th>
  21. <tr>
  22. <td id="paddingformultitop">Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>
  23. </td>
  24. <td>
  25. <select name="modelno_#count#">
  26. <option value="">Make A Selection</option>
  27. <cfloop query="models">
  28. <option value="#model#"<cfif #model# is #model_no#>selected</cfif>>#model#</option>
  29. </cfloop> 
  30. </select>
  31. </td>
  32. <td>
  33. &nbsp;&nbsp;&nbsp;&nbsp;Product Type:
  34. </td>
  35. <td>
  36. <select name="producttype_#count#">
  37. <option value="" selected>No Choice</option>
  38. <cfloop query="getProdType">
  39. <option value="#pk_productType#"<cfif #pk_productType# is #product_type#>selected</cfif>>#pk_productType#</option> 
  40. </cfloop>
  41. </select>
  42. </td>
  43. <td class="red'">
  44. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:
  45. </td>
  46. <td>
  47. <select name="hardwarefailure_#count#">
  48. <option value="" selected>Make A Selection</option>
  49. <cfloop query="getHardwareFail">
  50. <option value="#pk_hardwareFailure#"<cfif #pk_hardwareFailure# is #type_hardware_failure#>selected</cfif>>#pk_hardwareFailure#</option>
  51. </cfloop>
  52. </select>
  53. </td>
  54. </tr>
  55. <table>
  56.  
  57. <!--- Shows what was previously entered for Serial Number and Software/Hardware  --->
  58. <table class="zpExpandedTable" id="modeltable">
  59. <tr>
  60. <td id="paddingformultitop">
  61. Serial Number:&nbsp;&nbsp;
  62. <input type="text" name="serialnum_#count#" value="#pka_serialNo#">
  63. &nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;
  64. <select name="softhardware_#count#">
  65. <option value="" selected>No Choice</option>
  66. <cfloop query="getSoftHard">
  67. <option value="#pk_softwareHardware#"<cfif #pk_softwareHardware# is #software_hardware#>selected</cfif>>#pk_softwareHardware#</option>
  68. </cfloop>
  69. </select>
  70. </td>
  71. </tr>
  72. </table>
  73.  
  74. <!--- Shows what was previously entered for Description ---> 
  75.  
  76. <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0">
  77. <tr>
  78. <td id="paddingformutli">
  79. Description:&nbsp;&nbsp;
  80. </td>
  81. <td class="descriptionmoveinmulti">
  82. ( You may enter up to 500 characters. )
  83. <br>
  84. <cfloop query="description"><textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="thedescription_#count#">#description#</textarea></cfloop> 
  85. </td>
  86. </tr>
  87. </table>
  88.  
  89. <!---Shows what was previously entered for Resolution  --->
  90.  
  91. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  92. <tr>
  93. <td id="paddingformutli">
  94. Resolution:&nbsp;&nbsp;
  95. </td>
  96. <td class="resolutionmoveinmulti">
  97. ( You may enter up to 500 characters. )
  98. <br>
  99. <textarea  maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="resolution_#count#">#resolution#</textarea>
  100. </td>
  101. </tr>
  102. </table>
  103.  
  104. <!--- Shows what was previously entered for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
  105.  
  106. <table class="zpExpandedTable" id="resoldatetab" cellpadding="1" cellspacing="0">
  107. <tr>
  108. <td id="paddingformultitop">
  109. Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  110. </td>
  111. <td>
  112. <input type="text" name="resdate_#count#" value="#resolution_date#">&nbsp;&nbsp;
  113.  
  114. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  115. <!---<input type="checkbox" name="currentdateresol_' + count + '" onClick=resdate_" + count + ".value=fill_date()>--->
  116.  
  117. </td>
  118. <td>
  119. Resolution Verified as effective by:&nbsp;&nbsp;
  120. </td>
  121. <td>
  122. <select name="resvertified_#count#">
  123. <option value="" selected>Make A Selection</option>
  124. <cfloop query="gettech">
  125. <option value="#fname# #lname#"<cfif "#fname# #lname#" is #resolution_verified_by#>selected</cfif>>#fname# #lname#</option>
  126. </cfloop>
  127. </select>
  128. </td>
  129. </tr>
  130. </table>
  131. <!--- Shows what was previously entered for Vertification Date, Current Date (for vertification date)   --->
  132. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  133. <tr>
  134. <td id="paddingformultitop">
  135. Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  136. </td>
  137. <td class="vertificationmoveinmulti">
  138. <input type="text" name="vertifidate_#count#" value="#verification_date#">&nbsp;&nbsp;
  139. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  140. <!---<input type="checkbox" name="currentdatevert_' + count + '" onClick=vertifidate_" + count + ".value=fill_date()>--->
  141. </td>
  142. </tr>
  143. </table>
  144.  
  145. <!--- Shows what was previously entered for Dept/Vendor Responsibility  --->
  146. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  147. <tr>
  148. <td class="red" id="paddingformultitop">
  149. Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  150. <select name="deptvendor_#count#">
  151. <option value="" selected>Make A Selection</option>
  152. <cfloop query="getDeptVendor">
  153. <option value="#pk_deptVendor#"<cfif #pk_deptVendor# is #dept_responsibility#>selected</cfif>>#pk_deptVendor#</option>
  154. </cfloop>
  155. </select>
  156. </td>
  157. </tr>
  158. </table>
  159.  
  160. <!--- Shows what was previously entered for RMA Data Only  --->
  161. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  162. <tr>
  163. <td id="paddingformultitop">
  164. RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;
  165. </td>
  166. <td class="rmanmoveinmulti">
  167. ( You may enter up to 500 characters. )
  168. <br/>
  169. <textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="rma_#count#" >#rma_data#</textarea>
  170. </td>
  171. </tr>
  172. </table>
  173. <input type="hidden" value="#count#" id="theValue" />
  174. <input type="hidden" name="serialcount" value="#count#">
  175.  
  176. <!--- Adds Delete to every ticket  --->
  177. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  178. <tr>
  179. <td>
  180. <!---<input type="button" class="removeticket" value="Remove Serial &quot;'+count +'&quot;" onclick=\"removeElement(\'"+divIdName+"\')\">--->
  181. </td>
  182. </tr>
  183. </table>
  184.  
  185.      </div>
  186. </cfoutput>
  187.      <input type="button" class="addticket" value="Add Serial" onClick="addInput('dynamicInput');" >
Thank you,
Rach
Sep 24 '08 #34
acoder
16,027 Expert Mod 8TB
The line
Expand|Select|Wrap|Line Numbers
  1. var count = (document.getElementById('theValue').value -1)+ 2;
seems to add one to the count. Try:
Expand|Select|Wrap|Line Numbers
  1. var count = parseInt(document.getElementById('theValue').value)+ 1;
and see if that makes a difference.
Sep 25 '08 #35
bonneylake
769 512MB
The line
Expand|Select|Wrap|Line Numbers
  1. var count = (document.getElementById('theValue').value -1)+ 2;
seems to add one to the count. Try:
Expand|Select|Wrap|Line Numbers
  1. var count = parseInt(document.getElementById('theValue').value)+ 1;
and see if that makes a difference.
Hey Acoder,

That didn't seem to do anything to it. But i do got another question to ask you, i have a part in the form called remove an well was wondering how i could change this from javascript to html. i understand till the count part but past that i can't seem to get it right and get errors when i tried. here is what i have

Expand|Select|Wrap|Line Numbers
  1. <input type="button" class="removeticket" value="Remove Serial &quot;'+count +'&quot;" onclick=\"removeElement(\'"+divIdName+"\')\">
but here is the beginning of the javascript if you want to see it again
Expand|Select|Wrap|Line Numbers
  1. function addInput(divName){
  2. var dynamic = document.getElementById('dynamicInput');
  3. var thevalue = document.getElementById('theValue');
  4. <!---var count = parseInt(document.getElementById('theValue').value )+ 1;--->
  5. var count = (document.getElementById('theValue').value -1)+ 2;
  6. thevalue.value = count;
  7. var newdiv = document.createElement('div');
  8. var divIdName = 'dynamic'+count+'Input';
  9. newdiv.setAttribute('id',divIdName);
Thank you again for all the help :),
Rach
Sep 25 '08 #36
acoder
16,027 Expert Mod 8TB
That could be something like:
Expand|Select|Wrap|Line Numbers
  1. <input type="button" class="removeticket" value="Remove Serial #count#" onclick="removeElement('#divIdName#')">
Where is this going to go?

For the count, check the value in the source. Say with two records, is it two? In addInput (the JavaScript function), check the value of theValue.
Sep 25 '08 #37
bonneylake
769 512MB
That could be something like:
Expand|Select|Wrap|Line Numbers
  1. <input type="button" class="removeticket" value="Remove Serial #count#" onclick="removeElement('#divIdName#')">
Where is this going to go?

For the count, check the value in the source. Say with two records, is it two? In addInput (the JavaScript function), check the value of theValue.
Hey Acoder,

The remove part is going where you see the previously entered fields. The serial can add and remove fields (an needs to be able to remove previously entered fields and not just the new serials added).

but i looked at the source an its strange although it says serial information 2 twice (if i click add serial) it only shows serial information 1 and serial information 2 but does not show what i just added, it shows the previously added fields but does not show when i click add serial. I also just noticed that when i click add this is what happens.

serial information 1
displays previous entry

serial information 2
displays nothing

serial information 2
displays previous entry

i am not sure if that means anything. an in the javascript how do i make it check the value of theValue. because doesn't it do it right here or am i confused?
Expand|Select|Wrap|Line Numbers
  1. var count = (document.getElementById('theValue').value -1)+ 2;
  2. thevalue.value = count;
Thank you,
Rach
Sep 25 '08 #38
acoder
16,027 Expert Mod 8TB
For the remove button to work, you're going to have to enclose each previously entered ticket in a div with a unique id, so that you can pass that to the remove function. This ID can be what you use in JavaScript, i.e. "dynamic#count#Input".

The source will only show the source on page load. It won't show the code generated by JavaScript (though some browsers can allow you to see that with addons, for example).

From what you describe, it seems that the addInput is adding the table in between the two serials rather than at the end. Check the HTML tags all match up correctly and you haven't got tags mixed up, e.g. the closing div tag in the loop.
Sep 26 '08 #39
bonneylake
769 512MB
For the remove button to work, you're going to have to enclose each previously entered ticket in a div with a unique id, so that you can pass that to the remove function. This ID can be what you use in JavaScript, i.e. "dynamic#count#Input".

The source will only show the source on page load. It won't show the code generated by JavaScript (though some browsers can allow you to see that with addons, for example).

From what you describe, it seems that the addInput is adding the table in between the two serials rather than at the end. Check the HTML tags all match up correctly and you haven't got tags mixed up, e.g. the closing div tag in the loop.
Hey Acoder,

Ok i got the addInput to work better now (you was right the closeing div tag was inside the loop). But here is what it is doing now. the serial 1 and 2 are the ones i previously entered and the serial 2 below the first serial 2 and 3 are ones that i added. but here is an example of how it looks

serial information 1
serial information 2
serial information 2
serial information 3

i created a new div but i don't think i did it correctly. An i am getting errors with the remove button saying undetermined string constant.

i bolded everything i added/changed. here is everything inside the div

Expand|Select|Wrap|Line Numbers
  1.  <div id="dynamicInput">
  2.      <!--- All Ticket Information Appears Here--->
  3.     <!--- Shows what was previously entered for Model No, Product Type, and Type of Hardware Failure  --->
  4.  
  5. <cfset count = 0>
  6. <cfoutput query="serial">
  7. <cfset model_no = #model_no#>
  8. <cfset product_type = #product_type#>
  9. <cfset type_hardware_failure = #type_hardware_failure#>
  10. <cfset software_hardware = #software_hardware#>
  11. <cfset resolution_verified_by = #resolution_verified_by#>
  12. <cfset dept_responsibility = #dept_responsibility#>
  13. <cfif serial.recordcount is 0></cfif>
  14. <cfset count = count + 1>
  15. <div id="dynamic#count#Input">
  16. <table class="zpExpandedTable" id="modeltable"> 
  17. <th class="sectiontitletick" colspan="7">
  18. Serial Information #count# </th>
  19. <tr>
  20. <td id="paddingformultitop">Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>
  21. </td>
  22. <td>
  23. <select name="modelno_#count#">
  24. <option value="">Make A Selection</option>
  25. <cfloop query="models">
  26. <option value="#model#"<cfif #model# is #model_no#>selected</cfif>>#model#</option>
  27. </cfloop> 
  28. </select>
  29.  
  30. </td>
  31. <td>
  32. &nbsp;&nbsp;&nbsp;&nbsp;Product Type:
  33. </td>
  34. <td>
  35. <select name="producttype_#count#">
  36. <option value="" selected>No Choice</option>
  37. <cfloop query="getProdType">
  38. <option value="#pk_productType#"<cfif #pk_productType# is #product_type#>selected</cfif>>#pk_productType#</option> 
  39. </cfloop>
  40. </select>
  41. </td>
  42. <td class="red'">
  43. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:
  44. </td>
  45. <td>
  46. <select name="hardwarefailure_#count#">
  47. <option value="" selected>Make A Selection</option>
  48. <cfloop query="getHardwareFail">
  49. <option value="#pk_hardwareFailure#"<cfif #pk_hardwareFailure# is #type_hardware_failure#>selected</cfif>>#pk_hardwareFailure#</option>
  50. </cfloop>
  51. </select>
  52. </td>
  53. </tr>
  54. <table>
  55.  
  56. <!--- Shows what was previously entered for Serial Number and Software/Hardware  --->
  57. <table class="zpExpandedTable" id="modeltable">
  58. <tr>
  59. <td id="paddingformultitop">
  60. Serial Number:&nbsp;&nbsp;
  61. <input type="text" name="serialnum_#count#" value="#pka_serialNo#">
  62. &nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;
  63. <select name="softhardware_#count#">
  64. <option value="" selected>No Choice</option>
  65. <cfloop query="getSoftHard">
  66. <option value="#pk_softwareHardware#"<cfif #pk_softwareHardware# is #software_hardware#>selected</cfif>>#pk_softwareHardware#</option>
  67. </cfloop>
  68. </select>
  69. </td>
  70. </tr>
  71. </table>
  72.  
  73. <!--- Shows what was previously entered for Description ---> 
  74.  
  75. <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0">
  76. <tr>
  77. <td id="paddingformutli">
  78. Description:&nbsp;&nbsp;
  79. </td>
  80. <td class="descriptionmoveinmulti">
  81. ( You may enter up to 500 characters. )
  82. <br>
  83. <cfloop query="description"><textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="thedescription_#count#">#description#</textarea></cfloop> 
  84. </td>
  85. </tr>
  86. </table>
  87.  
  88. <!---Shows what was previously entered for Resolution  --->
  89.  
  90. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  91. <tr>
  92. <td id="paddingformutli">
  93. Resolution:&nbsp;&nbsp;
  94. </td>
  95. <td class="resolutionmoveinmulti">
  96. ( You may enter up to 500 characters. )
  97. <br>
  98. <textarea  maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="resolution_#count#">#resolution#</textarea>
  99. </td>
  100. </tr>
  101. </table>
  102.  
  103. <!--- Shows what was previously entered for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
  104.  
  105. <table class="zpExpandedTable" id="resoldatetab" cellpadding="1" cellspacing="0">
  106. <tr>
  107. <td id="paddingformultitop">
  108. Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  109. </td>
  110. <td>
  111. <input type="text" name="resdate_#count#" value="#resolution_date#">&nbsp;&nbsp;
  112.  
  113. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  114. <!---<input type="checkbox" name="currentdateresol_' + count + '" onClick=resdate_" + count + ".value=fill_date()>--->
  115.  
  116. </td>
  117. <td>
  118. Resolution Verified as effective by:&nbsp;&nbsp;
  119. </td>
  120. <td>
  121. <select name="resvertified_#count#">
  122. <option value="" selected>Make A Selection</option>
  123. <cfloop query="gettech">
  124. <option value="#fname# #lname#"<cfif "#fname# #lname#" is #resolution_verified_by#>selected</cfif>>#fname# #lname#</option>
  125. </cfloop>
  126. </select>
  127. </td>
  128. </tr>
  129. </table>
  130. <!--- Shows what was previously entered for Vertification Date, Current Date (for vertification date)   --->
  131. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  132. <tr>
  133. <td id="paddingformultitop">
  134. Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  135. </td>
  136. <td class="vertificationmoveinmulti">
  137. <input type="text" name="vertifidate_#count#" value="#verification_date#">&nbsp;&nbsp;
  138. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  139. <!---<input type="checkbox" name="currentdatevert_' + count + '" onClick=vertifidate_" + count + ".value=fill_date()>--->
  140. </td>
  141. </tr>
  142. </table>
  143.  
  144. <!--- Shows what was previously entered for Dept/Vendor Responsibility  --->
  145. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  146. <tr>
  147. <td class="red" id="paddingformultitop">
  148. Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  149. <select name="deptvendor_#count#">
  150. <option value="" selected>Make A Selection</option>
  151. <cfloop query="getDeptVendor">
  152. <option value="#pk_deptVendor#"<cfif #pk_deptVendor# is #dept_responsibility#>selected</cfif>>#pk_deptVendor#</option>
  153. </cfloop>
  154. </select>
  155. </td>
  156. </tr>
  157. </table>
  158.  
  159. <!--- Shows what was previously entered for RMA Data Only  --->
  160. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  161. <tr>
  162. <td id="paddingformultitop">
  163. RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;
  164. </td>
  165. <td class="rmanmoveinmulti">
  166. ( You may enter up to 500 characters. )
  167. <br/>
  168. <textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="rma_#count#" >#rma_data#</textarea>
  169. </td>
  170. </tr>
  171. </table>
  172. <input type="hidden" value="#count#" name="theValue" id="theValue" />
  173. <input type="hidden" name="serialcount" value="#count#">
  174.  
  175. <!--- Adds Delete to every ticket  --->
  176. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  177. <tr>
  178. <td>
  179. <input type="button" class="removeticket" value="Remove Serial #count#" onclick="removeElement('#divIdName#')">
  180. </td>
  181. </tr>
  182. </table>
  183. </div>
  184. </cfoutput>
  185. </div>
  186.      <input type="button" class="addticket" value="Add Serial" onClick="addInput('dynamicInput');" >
an didn't know if you wanted to see this but here is the javascript

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2.  
  3.  
  4.  <!---Allows us to add serial information multiple times --->
  5. function addInput(divName){
  6. var dynamic = document.getElementById('dynamicInput');
  7. var thevalue = document.getElementById('theValue');
  8. <!---var count = parseInt(document.getElementById('theValue').value )+ 1;--->
  9. <!---var count = (document.getElementById('theValue').value -1)+ 2;
  10. thevalue.value = count;--->
  11. var count = (document.getElementById('theValue').value -1)+ 2;
  12. thevalue.value = count;
  13. var newdiv = document.createElement('div');
  14. var divIdName = 'dynamic'+count+'Input';
  15. newdiv.setAttribute('id',divIdName);
  16.  
  17. <!--- Adds Extra fields for Model No, Product Type, and Type of Hardware Failure  --->
  18. newdiv.innerHTML =
  19. "<table class='zpExpandedTable' id='modeltable'>" +
  20. "<th class='sectiontitletick' colspan='7'>Serial Information "+ count +" </th>" +
  21. "<tr>" +
  22. "<td id='paddingformultitop'>Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>" +
  23. "</td>" +
  24. "<td>" +
  25.  "<select name='modelno_" + count + "' >" +
  26.  "<option value=''>Make A Selection</option>" +
  27. "<cfoutput query='models'>" + 
  28. "<option value='#model#'>#model#</option>" + 
  29. "</cfoutput>" + 
  30.  "</select>" +
  31.  "</td>" +
  32.  "<td>" +
  33. "&nbsp;&nbsp;&nbsp;&nbsp;Product Type:"  +
  34. "</td>" +
  35. "<td>" +
  36. "<select name='producttype_" + count + "'>" +
  37. "<option value='' selected>No Choice</option>" +
  38. "<cfoutput query='getProdType'>" + 
  39. "<option value='#pk_productType#'>#pk_productType#</option>" + 
  40. "</cfoutput>" + 
  41. "</select>" +
  42. "</td>" +
  43. "<td class='red'>" +
  44. "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:" +
  45. "</td>" +
  46. "<td>" +
  47. "<select name='hardwarefailure_" + count + "'>" +
  48. "<option value='' selected>Make A Selection</option>" +
  49. "<cfoutput query='getHardwareFail'>" +
  50. "<option value='#pk_hardwareFailure#'>#pk_hardwareFailure#</option>" +
  51. "</cfoutput>" +
  52. "</select>" +
  53. "</td>" +
  54. "</tr>" +
  55. "<table>";
  56.  
  57. <!--- Adds Extra fields for Serial Number and Software/Hardware  --->
  58. newdiv.innerHTML = newdiv.innerHTML +
  59. "<table class='zpExpandedTable' id='modeltable'>" +
  60. "<tr>" +
  61. "<td id='paddingformultitop'>" +
  62. "Serial Number:&nbsp;&nbsp;" +
  63. "<input type='text' name='serialnum_" + count + "'>" +
  64. "&nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;" +
  65. "<select name='softhardware_" + count + "'>" +
  66. "<option value='' selected>No Choice</option>" +
  67. "<cfoutput query='getSoftHard'>" + 
  68. "<option value='#pk_softwareHardware#'>#pk_softwareHardware#</option>" + 
  69. "</cfoutput>" + 
  70. "</select>" +
  71. "</td>" +
  72. "</tr>" +
  73. "</table>";
  74.  
  75. <!--- Adds Extra fields for Description  --->
  76. newdiv.innerHTML = newdiv.innerHTML + 
  77. "<table class='zpExpandedTable' id='resoltable' cellpadding='3' cellspacing='0'>" +
  78. "<tr>" +
  79. "<td id='paddingformutli'>" +
  80. "Description:&nbsp;&nbsp;" + 
  81. "</td>" +
  82. "<td class='descriptionmoveinmulti'>" +
  83. "( You may enter up to 500 characters. )"+
  84. "<br>" +
  85. "<textarea maxlength='500' onkeyup='return ismaxlength(this)' onkeydown='return ismaxlength(this)'rows='4' cols='60' name='thedescription_" + count + "'></textarea>" + 
  86. "</td>" +
  87. "</tr>" +
  88. "</table>";
  89.  
  90. <!--- Adds Extra fields for Resolution  --->
  91. newdiv.innerHTML = newdiv.innerHTML +
  92. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  93. "<tr>" +
  94. "<td id='paddingformutli'>" +
  95. "Resolution:&nbsp;&nbsp;" +
  96. "</td>" +
  97. "<td class='resolutionmoveinmulti'>" +
  98. "( You may enter up to 500 characters. )"+
  99. "<br>" +
  100. "<textarea  maxlength='500' onkeyup='return ismaxlength(this)' onkeydown='return ismaxlength(this)' rows='4' cols='60' name='resolution_" + count + "'></textarea>" +
  101. "</td>" +
  102. "</tr>" +
  103. "</table>";
  104.  
  105. <!--- Adds Extra fields for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
  106. newdiv.innerHTML = newdiv.innerHTML +
  107. "<table class='zpExpandedTable' id='resoldatetab' cellpadding='1' cellspacing='0'>" +
  108. "<tr>" +
  109. "<td id='paddingformultitop'>" +
  110. "Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;" +
  111. "</td>" +
  112. "<td>" +
  113. "<input type='text' name='resdate_" + count + "' value=''  >&nbsp;&nbsp;" +
  114.  
  115. "&nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;" +
  116. "<input type='checkbox' name='currentdateresol_" + count + "' onClick=resdate_" + count + ".value=fill_date()>" +
  117. "</td>" +
  118. "<td>" +
  119.  
  120. "Resolution Verified as effective by:&nbsp;&nbsp;"  +
  121. "</td>" +
  122. "<td>" +
  123. "<select name='resvertified_" + count + "'>" +
  124. "<option value='' selected>Make A Selection</option>" +
  125. "<cfoutput query='gettech'><option value='#fname# #lname#'>#fname# #lname#</option></cfoutput></select>" +
  126. "</td>" +
  127. "</tr>" +
  128. "</table>";
  129.  
  130. <!--- Adds Extra fields for Vertification Date, Current Date (for vertification date) and resolution vertified as effective by  --->
  131. newdiv.innerHTML = newdiv.innerHTML +
  132. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  133. "<tr>" +
  134. "<td id='paddingformultitop'>" +
  135. "Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;" +
  136. "</td>" +
  137. "<td class='vertificationmoveinmulti'>" +
  138. "<input type='text' name='vertifidate_" + count + "'>&nbsp;&nbsp;" +
  139. "&nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;" +
  140. "<input type='checkbox' name='currentdatevert_" + count + "' onClick=vertifidate_" + count + ".value=fill_date()>" +
  141. "</td>" +
  142. "</tr>" +
  143. "</table>";
  144.  
  145. <!--- Adds Extra fields for Dept/Vendor Responsibility  --->
  146. newdiv.innerHTML = newdiv.innerHTML +
  147. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  148. "<tr>" +
  149. "<td class='red' id='paddingformultitop'>" +
  150. "Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"  +
  151. "<select name='deptvendor_" + count + "'>" +
  152. "<option value='' selected>Make A Selection</option>" +
  153. "<cfoutput query='getDeptVendor'>" +
  154. "<option value='#pk_deptVendor#'>#pk_deptVendor#</option>" +
  155. " </cfoutput>" +
  156. "</select>" +
  157. "</td>" +
  158. "</tr>" +
  159. "</table>";
  160.  
  161. <!--- Adds Extra fields for RMA Data Only  --->
  162. newdiv.innerHTML = newdiv.innerHTML +
  163. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  164. "<tr>" +
  165. "<td id='paddingformultitop'>" +
  166. "RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;" +
  167. "</td>" +
  168. "<td class='rmanmoveinmulti'>" +
  169. "( You may enter up to 500 characters. )"+
  170. "<br/>" +
  171. "<textarea maxlength='500' onkeyup='return ismaxlength(this)' onkeydown='return ismaxlength(this)' rows='4' cols='60' name='rma_" + count + "'></textarea> " +
  172. "</td>" +
  173. "</tr>" +
  174. "</table>" +
  175. "<input type='hidden' name='serialcount' value='" + count + "'>";
  176.  
  177. <!--- Adds Delete to every ticket  --->
  178. newdiv.innerHTML = newdiv.innerHTML +
  179. "<table class='zpExpandedTable' id='resoltable' cellpadding='1' cellspacing='0'>" +
  180. "<tr>" +
  181. "<td>" +
  182. "<input type='button' class='removeticket' value='Remove Serial &quot;"+count +"&quot;' onclick=\"removeElement(\'"+divIdName+"\')\"></a>" +
  183. "</td>" +
  184. "</td>" +
  185. "</tr>" +
  186. "</table>";
  187.  
  188. document.getElementById(divName).appendChild(newdiv);
  189.  
  190.  
  191. <!---Allows us to remove multiple fields --->
  192. function removeElement(divNum) {
  193.   var d = document.getElementById('dynamicInput');
  194.   var olddiv = document.getElementById(divNum);
  195.   d.removeChild(olddiv);
  196. }
  197.  
  198. </script>
Thank you :),
Rach
Sep 26 '08 #40
acoder
16,027 Expert Mod 8TB
In the removeElement call, #divIdName# should be dynamic#count#Input because that's the name of the div.

As for the count, the reason for the problems is that the hidden input field "theValue" should be outside the loop.
Sep 26 '08 #41
bonneylake
769 512MB
In the removeElement call, #divIdName# should be dynamic#count#Input because that's the name of the div.

As for the count, the reason for the problems is that the hidden input field "theValue" should be outside the loop.
Hey Acoder,

The remove is working correctly :). But theValue is not, when i took it an put it outside now when i click add i get serial information NaN. I bolded where i added it at

Expand|Select|Wrap|Line Numbers
  1. <div id="dynamicInput"> 
  2.      <!--- All Ticket Information Appears Here--->
  3.  
  4.  
  5.     <!--- Shows what was previously entered for Model No, Product Type, and Type of Hardware Failure  --->
  6. <cfset count = 0>
  7. <!---<cfif serial.recordcount is 0></cfif>--->
  8. <input type="hidden" value="#count#" name="theValue" id="theValue" />
  9. <cfoutput query="serial">
  10. <cfset model_no = #model_no#>
  11. <cfset product_type = #product_type#>
  12. <cfset type_hardware_failure = #type_hardware_failure#>
  13. <cfset software_hardware = #software_hardware#>
  14. <cfset resolution_verified_by = #resolution_verified_by#>
  15. <cfset dept_responsibility = #dept_responsibility#>
  16. <cfset count = count + 1>
  17. <div id="dynamic#count#Input">
  18. <table class="zpExpandedTable" id="modeltable"> 
  19. <th class="sectiontitletick" colspan="7">
  20. Serial Information #count# </th>
  21. <tr>
  22. <td id="paddingformultitop">Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>
  23. </td>
  24. <td>
  25. <select name="modelno_#count#">
  26. <option value="">Make A Selection</option>
  27. <cfloop query="models">
  28. <option value="#model#"<cfif #model# is #model_no#>selected</cfif>>#model#</option>
  29. </cfloop> 
  30. </select>
  31.  
  32. </td>
  33. <td>
  34. &nbsp;&nbsp;&nbsp;&nbsp;Product Type:
  35. </td>
  36. <td>
  37. <select name="producttype_#count#">
  38. <option value="" selected>No Choice</option>
  39. <cfloop query="getProdType">
  40. <option value="#pk_productType#"<cfif #pk_productType# is #product_type#>selected</cfif>>#pk_productType#</option> 
  41. </cfloop>
  42. </select>
  43. </td>
  44. <td class="red'">
  45. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:
  46. </td>
  47. <td>
  48. <select name="hardwarefailure_#count#">
  49. <option value="" selected>Make A Selection</option>
  50. <cfloop query="getHardwareFail">
  51. <option value="#pk_hardwareFailure#"<cfif #pk_hardwareFailure# is #type_hardware_failure#>selected</cfif>>#pk_hardwareFailure#</option>
  52. </cfloop>
  53. </select>
  54. </td>
  55. </tr>
  56. <table>
  57.  
  58. <!--- Shows what was previously entered for Serial Number and Software/Hardware  --->
  59. <table class="zpExpandedTable" id="modeltable">
  60. <tr>
  61. <td id="paddingformultitop">
  62. Serial Number:&nbsp;&nbsp;
  63. <input type="text" name="serialnum_#count#" value="#pka_serialNo#">
  64. &nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;
  65. <select name="softhardware_#count#">
  66. <option value="" selected>No Choice</option>
  67. <cfloop query="getSoftHard">
  68. <option value="#pk_softwareHardware#"<cfif #pk_softwareHardware# is #software_hardware#>selected</cfif>>#pk_softwareHardware#</option>
  69. </cfloop>
  70. </select>
  71. </td>
  72. </tr>
  73. </table>
  74.  
  75. <!--- Shows what was previously entered for Description ---> 
  76.  
  77. <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0">
  78. <tr>
  79. <td id="paddingformutli">
  80. Description:&nbsp;&nbsp;
  81. </td>
  82. <td class="descriptionmoveinmulti">
  83. ( You may enter up to 500 characters. )
  84. <br>
  85. <cfloop query="description"><textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="thedescription_#count#">#description#</textarea></cfloop> 
  86. </td>
  87. </tr>
  88. </table>
  89.  
  90. <!---Shows what was previously entered for Resolution  --->
  91.  
  92. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  93. <tr>
  94. <td id="paddingformutli">
  95. Resolution:&nbsp;&nbsp;
  96. </td>
  97. <td class="resolutionmoveinmulti">
  98. ( You may enter up to 500 characters. )
  99. <br>
  100. <textarea  maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="resolution_#count#">#resolution#</textarea>
  101. </td>
  102. </tr>
  103. </table>
  104.  
  105. <!--- Shows what was previously entered for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
  106.  
  107. <table class="zpExpandedTable" id="resoldatetab" cellpadding="1" cellspacing="0">
  108. <tr>
  109. <td id="paddingformultitop">
  110. Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  111. </td>
  112. <td>
  113. <input type="text" name="resdate_#count#" value="#resolution_date#">&nbsp;&nbsp;
  114.  
  115. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  116. <!---<input type="checkbox" name="currentdateresol_' + count + '" onClick=resdate_" + count + ".value=fill_date()>--->
  117.  
  118. </td>
  119. <td>
  120. Resolution Verified as effective by:&nbsp;&nbsp;
  121. </td>
  122. <td>
  123. <select name="resvertified_#count#">
  124. <option value="" selected>Make A Selection</option>
  125. <cfloop query="gettech">
  126. <option value="#fname# #lname#"<cfif "#fname# #lname#" is #resolution_verified_by#>selected</cfif>>#fname# #lname#</option>
  127. </cfloop>
  128. </select>
  129. </td>
  130. </tr>
  131. </table>
  132. <!--- Shows what was previously entered for Vertification Date, Current Date (for vertification date)   --->
  133. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  134. <tr>
  135. <td id="paddingformultitop">
  136. Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  137. </td>
  138. <td class="vertificationmoveinmulti">
  139. <input type="text" name="vertifidate_#count#" value="#verification_date#">&nbsp;&nbsp;
  140. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  141. <!---<input type="checkbox" name="currentdatevert_' + count + '" onClick=vertifidate_" + count + ".value=fill_date()>--->
  142. </td>
  143. </tr>
  144. </table>
  145.  
  146. <!--- Shows what was previously entered for Dept/Vendor Responsibility  --->
  147. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  148. <tr>
  149. <td class="red" id="paddingformultitop">
  150. Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  151. <select name="deptvendor_#count#">
  152. <option value="" selected>Make A Selection</option>
  153. <cfloop query="getDeptVendor">
  154. <option value="#pk_deptVendor#"<cfif #pk_deptVendor# is #dept_responsibility#>selected</cfif>>#pk_deptVendor#</option>
  155. </cfloop>
  156. </select>
  157. </td>
  158. </tr>
  159. </table>
  160.  
  161. <!--- Shows what was previously entered for RMA Data Only  --->
  162. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  163. <tr>
  164. <td id="paddingformultitop">
  165. RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;
  166. </td>
  167. <td class="rmanmoveinmulti">
  168. ( You may enter up to 500 characters. )
  169. <br/>
  170. <textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="rma_#count#" >#rma_data#</textarea>
  171. </td>
  172. </tr>
  173. </table>
  174. <!---<input type="hidden" name="serialcount" value="#count#">--->
  175.  
  176. <!--- Adds Delete to every ticket  --->
  177. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  178. <tr>
  179. <td>
  180. <!---<input type="button" class="removeticket" value="Remove Serial &quot;'+count +'&quot;" onclick=\"removeElement(\'"+divIdName+"\')\">--->
  181. <input type="button" class="removeticket" value="Remove Serial #count#" onclick="removeElement('dynamic#count#Input')">
  182. </td>
  183. </tr>
  184. </table>
  185. </div>
  186. </cfoutput>
  187. </div>
  188.      <input type="button" class="addticket" value="Add Serial" onClick="addInput('dynamicInput');" >
  189.  
Thank you :),
Rach
Sep 26 '08 #42
acoder
16,027 Expert Mod 8TB
Two things: you should put it after the loop and #count# needs to have <cfoutput> tags around it.
Sep 26 '08 #43
bonneylake
769 512MB
Two things: you should put it after the loop and #count# needs to have <cfoutput> tags around it.
Hey Acoder,

I put it after an now it don't display previously entered fields, but when i click add it gets the right number. Bolded where i added it.

Expand|Select|Wrap|Line Numbers
  1. <!---<input type="hidden" value="0" id="theValue" />--->
  2.     <div id="dynamicInput"> 
  3.      <!--- All Ticket Information Appears Here--->
  4.  
  5.  
  6.     <!--- Shows what was previously entered for Model No, Product Type, and Type of Hardware Failure  --->
  7. <cfset count = 0>
  8. <!---<cfif serial.recordcount is 0></cfif>--->
  9. <cfoutput query="serial">
  10. <cfset model_no = #model_no#>
  11. <cfset product_type = #product_type#>
  12. <cfset type_hardware_failure = #type_hardware_failure#>
  13. <cfset software_hardware = #software_hardware#>
  14. <cfset resolution_verified_by = #resolution_verified_by#>
  15. <cfset dept_responsibility = #dept_responsibility#>
  16. <cfset count = count + 1>
  17. <div id="dynamic#count#Input">
  18. <cfif serial.recordcount is 0>
  19. <table class="zpExpandedTable" id="modeltable"> 
  20. <th class="sectiontitletick" colspan="7">
  21. Serial Information #count# </th>
  22. <tr>
  23. <td id="paddingformultitop">Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>
  24. </td>
  25. <td>
  26. <select name="modelno_#count#">
  27. <option value="">Make A Selection</option>
  28. <cfloop query="models">
  29. <option value="#model#"<cfif #model# is #model_no#>selected</cfif>>#model#</option>
  30. </cfloop> 
  31. </select>
  32.  
  33. </td>
  34. <td>
  35. &nbsp;&nbsp;&nbsp;&nbsp;Product Type:
  36. </td>
  37. <td>
  38. <select name="producttype_#count#">
  39. <option value="" selected>No Choice</option>
  40. <cfloop query="getProdType">
  41. <option value="#pk_productType#"<cfif #pk_productType# is #product_type#>selected</cfif>>#pk_productType#</option> 
  42. </cfloop>
  43. </select>
  44. </td>
  45. <td class="red'">
  46. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:
  47. </td>
  48. <td>
  49. <select name="hardwarefailure_#count#">
  50. <option value="" selected>Make A Selection</option>
  51. <cfloop query="getHardwareFail">
  52. <option value="#pk_hardwareFailure#"<cfif #pk_hardwareFailure# is #type_hardware_failure#>selected</cfif>>#pk_hardwareFailure#</option>
  53. </cfloop>
  54. </select>
  55. </td>
  56. </tr>
  57. <table>
  58.  
  59. <!--- Shows what was previously entered for Serial Number and Software/Hardware  --->
  60. <table class="zpExpandedTable" id="modeltable">
  61. <tr>
  62. <td id="paddingformultitop">
  63. Serial Number:&nbsp;&nbsp;
  64. <input type="text" name="serialnum_#count#" value="#pka_serialNo#">
  65. &nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;
  66. <select name="softhardware_#count#">
  67. <option value="" selected>No Choice</option>
  68. <cfloop query="getSoftHard">
  69. <option value="#pk_softwareHardware#"<cfif #pk_softwareHardware# is #software_hardware#>selected</cfif>>#pk_softwareHardware#</option>
  70. </cfloop>
  71. </select>
  72. </td>
  73. </tr>
  74. </table>
  75.  
  76. <!--- Shows what was previously entered for Description ---> 
  77.  
  78. <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0">
  79. <tr>
  80. <td id="paddingformutli">
  81. Description:&nbsp;&nbsp;
  82. </td>
  83. <td class="descriptionmoveinmulti">
  84. ( You may enter up to 500 characters. )
  85. <br>
  86. <cfloop query="description"><textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="thedescription_#count#">#description#</textarea></cfloop> 
  87. </td>
  88. </tr>
  89. </table>
  90.  
  91. <!---Shows what was previously entered for Resolution  --->
  92.  
  93. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  94. <tr>
  95. <td id="paddingformutli">
  96. Resolution:&nbsp;&nbsp;
  97. </td>
  98. <td class="resolutionmoveinmulti">
  99. ( You may enter up to 500 characters. )
  100. <br>
  101. <textarea  maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="resolution_#count#">#resolution#</textarea>
  102. </td>
  103. </tr>
  104. </table>
  105.  
  106. <!--- Shows what was previously entered for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
  107.  
  108. <table class="zpExpandedTable" id="resoldatetab" cellpadding="1" cellspacing="0">
  109. <tr>
  110. <td id="paddingformultitop">
  111. Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  112. </td>
  113. <td>
  114. <input type="text" name="resdate_#count#" value="#resolution_date#">&nbsp;&nbsp;
  115.  
  116. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  117. <!---<input type="checkbox" name="currentdateresol_' + count + '" onClick=resdate_" + count + ".value=fill_date()>--->
  118.  
  119. </td>
  120. <td>
  121. Resolution Verified as effective by:&nbsp;&nbsp;
  122. </td>
  123. <td>
  124. <select name="resvertified_#count#">
  125. <option value="" selected>Make A Selection</option>
  126. <cfloop query="gettech">
  127. <option value="#fname# #lname#"<cfif "#fname# #lname#" is #resolution_verified_by#>selected</cfif>>#fname# #lname#</option>
  128. </cfloop>
  129. </select>
  130. </td>
  131. </tr>
  132. </table>
  133. <!--- Shows what was previously entered for Vertification Date, Current Date (for vertification date)   --->
  134. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  135. <tr>
  136. <td id="paddingformultitop">
  137. Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  138. </td>
  139. <td class="vertificationmoveinmulti">
  140. <input type="text" name="vertifidate_#count#" value="#verification_date#">&nbsp;&nbsp;
  141. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  142. <!---<input type="checkbox" name="currentdatevert_' + count + '" onClick=vertifidate_" + count + ".value=fill_date()>--->
  143. </td>
  144. </tr>
  145. </table>
  146.  
  147. <!--- Shows what was previously entered for Dept/Vendor Responsibility  --->
  148. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  149. <tr>
  150. <td class="red" id="paddingformultitop">
  151. Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  152. <select name="deptvendor_#count#">
  153. <option value="" selected>Make A Selection</option>
  154. <cfloop query="getDeptVendor">
  155. <option value="#pk_deptVendor#"<cfif #pk_deptVendor# is #dept_responsibility#>selected</cfif>>#pk_deptVendor#</option>
  156. </cfloop>
  157. </select>
  158. </td>
  159. </tr>
  160. </table>
  161.  
  162. <!--- Shows what was previously entered for RMA Data Only  --->
  163. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  164. <tr>
  165. <td id="paddingformultitop">
  166. RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;
  167. </td>
  168. <td class="rmanmoveinmulti">
  169. ( You may enter up to 500 characters. )
  170. <br/>
  171. <textarea maxlength="500" onkeyup="return ismaxlength(this)" onkeydown="return ismaxlength(this)" rows="4" cols="60" name="rma_#count#" >#rma_data#</textarea>
  172. </td>
  173. </tr>
  174. </table>
  175. <!---<input type="hidden" name="serialcount" value="#count#">--->
  176.  
  177. <!--- Adds Delete to every ticket  --->
  178. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  179. <tr>
  180. <td>
  181. <!---<input type="button" class="removeticket" value="Remove Serial &quot;'+count +'&quot;" onclick=\"removeElement(\'"+divIdName+"\')\">--->
  182. <input type="button" class="removeticket" value="Remove Serial #count#" onclick="removeElement('dynamic#count#Input')">
  183. </td>
  184. </tr>
  185. </table>
  186. </cfif>
  187. </div>
  188. </cfoutput>
  189. <input type="hidden" value="<cfoutput>#count#</cfoutput>" name="theValue" id="theValue" />
  190. </div>
  191.      <input type="button" class="addticket" value="Add Serial" onClick="addInput('dynamicInput');" >
Thank you,
Rach
Sep 26 '08 #44
acoder
16,027 Expert Mod 8TB
That's because of the line:
Expand|Select|Wrap|Line Numbers
  1. <cfif serial.recordcount is 0>
as I mentioned in the other thread. You can remove it unless it's required in which case copy and remove from there and add to the end.
Sep 26 '08 #45
bonneylake
769 512MB
That's because of the line:
Expand|Select|Wrap|Line Numbers
  1. <cfif serial.recordcount is 0>
as I mentioned in the other thread. You can remove it unless it's required in which case copy and remove from there and add to the end.
Hey Acoder,

YAY IT WORKS, IT WORKS!!!! but do want to ask one last question.so i shouldn't have a problem with it inserting in to the table correct?this is what i am using to insert into it before and just want to make sure i shouldn't have a problem when it goes to insert.

Expand|Select|Wrap|Line Numbers
  1. <CFIF REQUEST_METHOD EQ "POST">
  2. <CFSET machineListLen = listLen(Form.serialcount)>
  3. <CFLOOP from="1" to="#machineListLen#" index="machineCount">
  4.  <CFSET serialnum       = "Form.serialnum_" & machineCount>
  5.  <CFSET modelno         = "Form.modelno_" & machineCount>
  6.  <CFSET producttype     = "Form.producttype_" & machineCount>
  7.  <CFSET softhardware    = "Form.softhardware_" & machineCount>
  8.  <CFSET resolution      = "Form.resolution_" & machineCount>
  9.  <CFSET resdate         = "Form.resdate_" & machineCount>
  10.  <CFSET resvertified    = "Form.resvertified_" & machineCount>
  11.  <CFSET vertifidate     = "Form.vertifidate_" & machineCount>
  12.  <CFSET deptvendor      = "Form.deptvendor_" & machinecount>
  13.  <CFSET hardwarefailure = "Form.hardwarefailure_" & machineCount>
  14.  <CFSET rma             = "Form.rma_" & machineCount>
  15.  <CFSET thedescription  = "Form.thedescription_" & machineCount>
  16.  
  17. <CFQUERY Name="serial" DataSource="CustomerSupport">
  18.    exec usp_CS_Insertserial 
  19.      '#evaluate(serialnum)#','#Form.ID#','#evaluate(modelno)#','#evaluate(producttype)#',
  20.      '#evaluate(softhardware)#','#evaluate(resolution)#','#evaluate(resdate)#','
  21.       #evaluate(resvertified)#','#evaluate(vertifidate)#','#evaluate(deptvendor)#',
  22.      '#evaluate(hardwarefailure)#','#evaluate(rma)#'
  23.    </CFQUERY>
THANK YOU AGAIN FOR ALL THE HELP I REALLY APPRECIATE IT!!!
Rach
Sep 26 '08 #46
acoder
16,027 Expert Mod 8TB
Glad it's working :)

As for the insert, I would assume so. The best way would be to test and see.
Sep 26 '08 #47
bonneylake
769 512MB
Glad it's working :)

As for the insert, I would assume so. The best way would be to test and see.
Hey Acoder,

Alrighty just wanted to make sure that everything should be ok, but all test it sometime next week, but THANK YOU again for all the help you have no idea how much this means to me.

THANK YOU, THANK YOU!!!
Rach
Sep 26 '08 #48
bonneylake
769 512MB
Hey Acoder,

I thought i was done with this but i am sadly not. I realized that when i add 2 descriptions now that it does the side by side problem i was having with the serial information. I tried a few things but i can not seem to get it right. Any ideas on how i can make it do what serial does now with description? the problem i am having is description is between all the serial information an the count. Here is what i have

This shows the div
Expand|Select|Wrap|Line Numbers
  1.  <div id="dynamicInput"> 
  2.      <!--- All Ticket Information Appears Here--->
  3.  
  4.  
  5.     <!--- Shows what was previously entered for Model No, Product Type, and Type of Hardware Failure  --->
  6. <cfset count = 0>
  7. <!---<cfif serial.recordcount is 0>--->
  8. <cfoutput query="serial">
  9. <cfset model_no = #model_no#>
  10. <cfset product_type = #product_type#>
  11. <cfset type_hardware_failure = #type_hardware_failure#>
  12. <cfset software_hardware = #software_hardware#>
  13. <cfset resolution_verified_by = #resolution_verified_by#>
  14. <cfset dept_responsibility = #dept_responsibility#>
  15. <cfset count = count + 1>
  16. <div id="dynamic#count#Input">
  17. <table class="zpExpandedTable" id="modeltable"> 
  18. <th class="sectiontitletick" colspan="7">
  19. Serial Information #count# </th>
  20. <tr>
  21. <td id="paddingformultitop">Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>
  22. </td>
  23. <td>
  24. <select name="modelno_#count#">
  25. <option value="">Make A Selection</option>
  26. <cfloop query="models">
  27. <option value="#model#"<cfif #model# is #model_no#>selected</cfif>>#model#</option>
  28. </cfloop> 
  29. </select>
  30. </td>
  31. <td>
  32. &nbsp;&nbsp;&nbsp;&nbsp;Product Type:
  33. </td>
  34. <td>
  35. <select name="producttype_#count#">
  36. <option value="" selected>No Choice</option>
  37. <cfloop query="getProdType">
  38. <option value="#pk_productType#"<cfif #pk_productType# is #product_type#>selected</cfif>>#pk_productType#</option> 
  39. </cfloop>
  40. </select>
  41. </td>
  42. <td class="red">
  43. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:
  44. </td>
  45. <td>
  46. <select name="hardwarefailure_#count#">
  47. <option value="" selected>Make A Selection</option>
  48. <cfloop query="getHardwareFail">
  49. <option value="#pk_hardwareFailure#"<cfif #pk_hardwareFailure# is #type_hardware_failure#>selected</cfif>>#pk_hardwareFailure#</option>
  50. </cfloop>
  51. </select>
  52. </td>
  53. </tr>
  54. <table>
  55.  
  56. <!--- Shows what was previously entered for Serial Number and Software/Hardware  --->
  57. <table class="zpExpandedTable" id="modeltable">
  58. <tr>
  59. <td id="paddingformultitop">
  60. Serial Number:&nbsp;&nbsp;
  61. <input type="text" name="serialnum_#count#" value="#pka_serialNo#">
  62. &nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;
  63. <select name="softhardware_#count#">
  64. <option value="" selected>No Choice</option>
  65. <cfloop query="getSoftHard">
  66. <option value="#pk_softwareHardware#"<cfif #pk_softwareHardware# is #software_hardware#>selected</cfif>>#pk_softwareHardware#</option>
  67. </cfloop>
  68. </select>
  69. </td>
  70. </tr>
  71. </table>
  72.  
  73. <!--- Shows what was previously entered for Description ---> 
  74.  
  75. <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0">
  76. <tr>
  77. <td id="paddingformutli">
  78. Description:&nbsp;&nbsp;
  79. </td>
  80. <td class="descriptionmoveinmulti">
  81. ( You may enter up to 1000 characters. )
  82. <br>
  83. <cfloop query="description"><textarea maxlength='1000' onkeyup='return descriptionmaxlength(this)' onkeydown='return descriptionmaxlength(this)'rows='4' cols='60' name="thedescription_#count#">#description#</textarea></cfloop> 
  84. </td>
  85. </tr>
  86. </table>
  87.  
  88. <!---Shows what was previously entered for Resolution  --->
  89.  
  90. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  91. <tr>
  92. <td id="paddingformutli">
  93. Resolution:&nbsp;&nbsp;
  94. </td>
  95. <td class="resolutionmoveinmulti">
  96. ( You may enter up to 1500 characters. )
  97. <br>
  98. <textarea  maxlength="1500" onkeyup="return resolutionismaxlength(this)" onkeydown="return resolutionismaxlength(this)" rows="4" cols="60" name="resolution_#count#">#resolution#</textarea>
  99. </td>
  100. </tr>
  101. </table>
  102.  
  103. <!--- Shows what was previously entered for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
  104.  
  105. <table class="zpExpandedTable" id="resoldatetab" cellpadding="1" cellspacing="0">
  106. <tr>
  107. <td id="paddingformultitop">
  108. Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  109. </td>
  110. <td>
  111. <input type="text" name="resdate_#count#" value="#resolution_date#">&nbsp;&nbsp;
  112. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  113. <input type="checkbox" name="currentdateresol_#count#" 
  114. onClick="resdate_#count#.value=fill_date()">
  115. </td>
  116. <td>
  117. Resolution Verified as effective by:&nbsp;&nbsp;
  118. </td>
  119. <td>
  120. <select name="resvertified_#count#">
  121. <option value="" selected>Make A Selection</option>
  122. <cfloop query="gettech">
  123. <option value="#fname# #lname#"<cfif "#fname# #lname#" is #resolution_verified_by#>
  124. selected</cfif>>#fname# #lname#</option>
  125. </cfloop>
  126. </select>
  127. </td>
  128. </tr>
  129. </table>
  130. <!--- Shows what was previously entered for Vertification Date, Current Date (for vertification date)   --->
  131. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  132. <tr>
  133. <td id="paddingformultitop">
  134. Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  135. </td>
  136. <td class="vertificationmoveinmulti">
  137. <input type="text" name="vertifidate_#count#" value="#verification_date#">&nbsp;&nbsp;
  138. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  139. <input type="checkbox" name="currentdatevert_#count#" 
  140. onClick="vertifidate_#count#.value=fill_date()">
  141.  
  142. </td>
  143. </tr>
  144. </table>
  145.  
  146. <!--- Shows what was previously entered for Dept/Vendor Responsibility  --->
  147. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  148. <tr>
  149. <td class="red" id="paddingformultitop">
  150. Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  151. <select name="deptvendor_#count#">
  152. <option value="" selected>Make A Selection</option>
  153. <cfloop query="getDeptVendor">
  154. <option value="#pk_deptVendor#"<cfif #pk_deptVendor# is #dept_responsibility#>selected</cfif>>#pk_deptVendor#</option>
  155. </cfloop>
  156. </select>
  157. </td>
  158. </tr>
  159. </table>
  160.  
  161. <!--- Shows what was previously entered for RMA Data Only  --->
  162. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  163. <tr>
  164. <td id="paddingformultitop">
  165. RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;
  166. </td>
  167. <td class="rmanmoveinmulti">
  168. ( You may enter up to 1000 characters. )
  169. <br/>
  170. <textarea maxlength="1000" onkeyup="return rmaismaxlength(this)" onkeydown="return rmaismaxlength(this)" rows="4" cols="60" name="rma_#count#" >#rma_data#</textarea>
  171. </td>
  172. </tr>
  173. </table>
  174. <!---<input type="hidden" name="serialcount" value="#count#">--->
  175.  
  176. <!--- Adds Delete to every ticket  --->
  177. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  178. <tr>
  179. <td>
  180. <input type="button" class="removeticket" value="Remove Serial #count#" onclick="removeElement('dynamic#count#Input')">
  181. </td>
  182. </tr>
  183. </table>
  184. </div>
  185. </cfoutput>
  186. <input type="hidden" value="<cfoutput>#count#</cfoutput>" name="theValue" id="theValue" />
  187.  
  188.  
  189. <!---If have any blanks in serial table it will make field appear--->
  190. <cfoutput query="serial">
  191. <cfset model_no = #model_no#>
  192. <cfset product_type = #product_type#>
  193. <cfset type_hardware_failure = #type_hardware_failure#>
  194. <cfset pka_serialNo = #pka_serialNo#>
  195. <cfset software_hardware = #software_hardware#>
  196. <cfset description = #description#>
  197. <cfset resolution = #resolution#>
  198. <cfset resolution_date = #resolution_date#>
  199. <cfset resolution_verified_by = #resolution_verified_by#>
  200. <cfset verification_date = #verification_date#>
  201. <cfset dept_responsibility = #dept_responsibility#>
  202. <cfset rma_data = #rma_data#>
  203. </cfoutput>
  204. <cfif serial.recordcount is 0>
  205. <cfset model_no = "">
  206. <cfset product_type = "">
  207. <cfset type_hardware_failure = "">
  208. <cfset pka_serialNo = "">
  209. <cfset software_hardware = "">
  210. <cfset description = "">
  211. <cfset resolution = "">
  212. <cfset resolution_date = "">
  213. <cfset resolution_verified_by = "">
  214. <cfset verification_date = "">
  215. <cfset dept_responsibility = "">
  216. <cfset rma_data = "">
  217. <cfinclude template="serialdisplay.cfm">
  218. </cfif>
  219.  
  220.  
  221.  
  222. </div>
  223.      <input type="button" class="addticket" value="Add Serial" onClick="addInput('dynamicInput');" >
  224.  
this is whats on the serialdisplay.cfm page
Expand|Select|Wrap|Line Numbers
  1. <cfif serial.recordcount is 0>  
  2. <cfset count = 0>
  3. <!---<cfif serial.recordcount is 0>--->
  4. <cfset count = count + 1>
  5. <cfoutput>
  6. <div id="dynamic#count#Input">
  7. <table class="zpExpandedTable" id="modeltable"> 
  8. <th class="sectiontitletick" colspan="7">
  9. Serial Information #count# </th>
  10. <tr>
  11. <td id="paddingformultitop">Model No:&nbsp;&nbsp;&nbsp;&nbsp;</td>
  12. </td>
  13. <td>
  14. <select name="modelno_#count#">
  15. <option value="">Make A Selection</option>
  16. <cfloop query="models">
  17. <option value="#model#">#model#</option>
  18.  
  19. </cfloop> 
  20. </select>
  21.  
  22. </td>
  23. <td>
  24. &nbsp;&nbsp;&nbsp;&nbsp;Product Type:
  25. </td>
  26. <td>
  27. <select name="producttype_#count#">
  28. <option value="" selected>No Choice</option>
  29. <cfloop query="getProdType">
  30. <option value="#pk_productType#">#pk_productType#</option> 
  31. </cfloop>
  32. </select>
  33. </td>
  34. <td class="red'">
  35. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:
  36. </td>
  37. <td>
  38. <select name="hardwarefailure_#count#">
  39. <option value="" selected>Make A Selection</option>
  40. <cfloop query="getHardwareFail">
  41. <option value="#pk_hardwareFailure#">#pk_hardwareFailure#</option>
  42. </cfloop>
  43. </select>
  44. </td>
  45. </tr>
  46. <table>
  47.  
  48. <!--- Shows what was previously entered for Serial Number and Software/Hardware  --->
  49. <table class="zpExpandedTable" id="modeltable">
  50. <tr>
  51. <td id="paddingformultitop">
  52. Serial Number:&nbsp;&nbsp;
  53. <input type="text" name="serialnum_#count#" value="">
  54. &nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;
  55. <select name="softhardware_#count#">
  56. <option value="" selected>No Choice</option>
  57. <cfloop query="getSoftHard">
  58. <option value="#pk_softwareHardware#">#pk_softwareHardware#</option>
  59. </cfloop>
  60. </select>
  61. </td>
  62. </tr>
  63. </table>
  64.  
  65. <!--- Shows what was previously entered for Description ---> 
  66.  
  67. <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0">
  68. <tr>
  69. <td id="paddingformutli">
  70. Description:&nbsp;&nbsp;
  71. </td>
  72. <td class="descriptionmoveinmulti">
  73. ( You may enter up to 1000 characters. )
  74. <br>
  75. <textarea maxlength='1000' onkeyup='return descriptionmaxlength(this)' onkeydown='return descriptionmaxlength(this)'rows='4' cols='60' name="thedescription_#count#"></textarea>
  76. </td>
  77. </tr>
  78. </table>
  79.  
  80. <!---Shows what was previously entered for Resolution  --->
  81.  
  82. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  83. <tr>
  84. <td id="paddingformutli">
  85. Resolution:&nbsp;&nbsp;
  86. </td>
  87. <td class="resolutionmoveinmulti">
  88. ( You may enter up to 1500 characters. )
  89. <br>
  90. <textarea maxlength='1500' onkeyup='return resolutionmaxlength(this)' onkeydown='return resolutionmaxlength(this)' rows='4' cols='60' name="resolution_#count#"></textarea>
  91. </td>
  92. </tr>
  93. </table>
  94.  
  95. <!--- Shows what was previously entered for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by  --->
  96.  
  97. <table class="zpExpandedTable" id="resoldatetab" cellpadding="1" cellspacing="0">
  98. <tr>
  99. <td id="paddingformultitop">
  100. Resolution Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  101. </td>
  102. <td>
  103. <input type="text" name="resdate_#count#" value="">&nbsp;&nbsp;
  104.  
  105. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  106. <input type="checkbox" name="currentdateresol_#count#" 
  107. onClick="resdate_#count#.value=fill_date()">
  108.  
  109. </td>
  110. <td>
  111. Resolution Verified as effective by:&nbsp;&nbsp;
  112. </td>
  113. <td>
  114. <select name="resvertified_#count#">
  115. <option value="" selected>Make A Selection</option>
  116. <cfloop query="gettech">
  117. <option value="#fname# #lname#">#fname# #lname#</option>
  118. </cfloop>
  119. </select>
  120. </td>
  121. </tr>
  122. </table>
  123. <!--- Shows what was previously entered for Vertification Date, Current Date (for vertification date)   --->
  124. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  125. <tr>
  126. <td id="paddingformultitop">
  127. Verification Date:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
  128. </td>
  129. <td class="vertificationmoveinmulti">
  130. <input type="text" name="vertifidate_#count#" value="">&nbsp;&nbsp;
  131. &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
  132. <input type="checkbox" name="currentdatevert_#count#" 
  133. onClick="vertifidate_#count#.value=fill_date()">
  134.  
  135. </td>
  136. </tr>
  137. </table>
  138.  
  139. <!--- Shows what was previously entered for Dept/Vendor Responsibility  --->
  140. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  141. <tr>
  142. <td class="red" id="paddingformultitop">
  143. Dept/Vendor Responsibility*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  144. <select name="deptvendor_#count#">
  145. <option value="" selected>Make A Selection</option>
  146. <cfloop query="getDeptVendor">
  147. <option value="#pk_deptVendor#">#pk_deptVendor#</option>
  148. </cfloop>
  149. </select>
  150. </td>
  151. </tr>
  152. </table>
  153.  
  154. <!--- Shows what was previously entered for RMA Data Only  --->
  155. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  156. <tr>
  157. <td id="paddingformultitop">
  158. RMA Data Only:&nbsp;&nbsp;&nbsp;&nbsp;
  159. </td>
  160. <td class="rmanmoveinmulti">
  161. ( You may enter up to 1000 characters. )
  162. <br/>
  163. <textarea maxlength='1000' onkeyup='return rmamaxlength(this)' onkeydown='return rmamaxlength(this)' rows='4' cols='60' name="rma_#count#"></textarea> 
  164. </td>
  165. </tr>
  166. </table>
  167. <!---<input type="hidden" name="serialcount" value="#count#">--->
  168.  
  169. <!--- Adds Delete to every ticket  --->
  170. <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0">
  171. <tr>
  172. <td>
  173. <!---<input type="button" class="removeticket" value="Remove Serial &quot;'+count +'&quot;" onclick=\"removeElement(\'"+divIdName+"\')\">--->
  174. <input type="button" class="removeticket" value="Remove Serial #count#" onclick="removeElement('dynamic#count#Input')">
  175. </td>
  176. </tr>
  177. </table>
  178. </div>
  179. </cfoutput>
  180. <input type="hidden" value="<cfoutput>#count#</cfoutput>" name="theValue" id="theValue" />
  181. </cfif>
Thank you,
Rach
Oct 10 '08 #49
acoder
16,027 Expert Mod 8TB
It seems as though this line shows the description (line 83):
Expand|Select|Wrap|Line Numbers
  1. <cfloop query="description"><textarea maxlength='1000' onkeyup='return descriptionmaxlength(this)' onkeydown='return descriptionmaxlength(this)'rows='4' cols='60' name="thedescription_#count#">#description#</textarea></cfloop> 
Is the problem that instead of one description per serial, it's showing all descriptions side by side or is it that multiple descriptions can appear under one serial, but they're just not in the right place?
Oct 11 '08 #50

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Charles Alexander | last post by:
Hello I am new to php & MySQL - I am trying to retrieve some records from a MySQL table and redisplay them. The data in list form looks like this: Sample_ID Marker_ID Variation ...
6
by: Ravi | last post by:
Hi All, I am trying to execute a select statement using the DBI module of perl in a for loop. I am getting a strange behaviour, the select statement is excuting correctly only for the last element...
43
by: Gremlin | last post by:
If you are not familiar with the halting problem, I will not go into it in detail but it states that it is impossible to write a program that can tell if a loop is infinite or not. This is a...
11
by: Roman Töngi | last post by:
for (int i = 1; i <= 10; i++) cout << i << endl; I expected the following: 1 2 3 4 5 6
2
by: Alex | last post by:
Compiler - Borland C++ 5.6.4 for Win32 Copyright (c) 1993, 2002 Borland Linker - Turbo Incremental Link 5.65 Copyright (c) 1997-2002 Borland Platform - Win32 (XP) Quite by accident I stumbled...
63
by: Aaron Ackerman | last post by:
What is the sytax for exiting a for loop in C#?
6
by: John Pass | last post by:
What is the difference between a While and Do While/Loop repetition structure. If they is no difference (as it seems) why do both exist?
16
by: Claudio Grondi | last post by:
Sometimes it is known in advance, that the time spent in a loop will be in order of minutes or even hours, so it makes sense to optimize each element in the loop to make it run faster. One of...
2
ADezii
by: ADezii | last post by:
If you are executing a code segment for a fixed number of iterations, always use a For...Next Loop instead of a Do...Loop, since it is significantly faster. Each pass through a Do...Loop that...
3
by: numlock00 | last post by:
I have a nested 'while' loop that won't repeat, no matter how many times the outer loop repeats. The outer loop reads through an array of elements; the inner loop Ithe 'while' loop) is supposed to...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.