Advertisement
Guest User

Untitled

a guest
Jul 16th, 2013
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.17 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2.  
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml">
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  7.  
  8. <!-- Insert script for form duplication function -->
  9.  
  10. <script type="text/javascript">
  11.  
  12. var counter = 0;
  13.  
  14. function init() {
  15. document.getElementById('moreFields').onclick = moreFields;
  16. moreFields();
  17.  
  18. }
  19.  
  20. function moreFields() {
  21. counter++;
  22. var newFields = document.getElementById('readroot').cloneNode(true);
  23. newFields.id = '';
  24. newFields.style.display = 'block';
  25. var newField = newFields.childNodes;
  26. for (var i=0;i<newField.length;i++) {
  27. var theName = newField[i].name
  28. if (theName)
  29. newField[i].name = theName + counter;
  30. }
  31. var insertHere = document.getElementById('writeroot');
  32. insertHere.parentNode.insertBefore(newFields,insertHere);
  33. }
  34.  
  35. window.onload = moreFields;
  36.  
  37. </script>
  38.  
  39.  
  40. </head>
  41.  
  42.  
  43. <body bgcolor="#FFFFFF">
  44.  
  45. <!-- Insert hidden section template. -->
  46.  
  47. <div id="readroot" name="wsform" style="display:none !important;">
  48.  
  49. <table border="0"
  50. cellpadding="0"
  51. cellspacing="0"
  52. width="90%"
  53. bgcolor="#FFFFFF">
  54.  
  55.  
  56. <tr>
  57. <td class="txt4small"
  58. colspan="2">
  59. Information</td>
  60. </tr>
  61.  
  62. <tr>
  63. <td class="bg2"
  64. colspan="2">
  65.  
  66. </tr>
  67.  
  68. <tr>
  69. <td colspan="2">
  70. </td>
  71. </tr>
  72.  
  73. <tr>
  74. <td class="txt3bld"
  75. nowrap="nowrap">Date
  76. </td>
  77.  
  78. <td><input type="Text"
  79. size="30"
  80. class="txtinput"
  81. name="w1date"
  82. id="Workshop Date"
  83.  
  84. required="y"
  85.  
  86. value="" /></td></tr>
  87.  
  88.  
  89.  
  90. </table>
  91.  
  92. <input type="button" value="Remove Workshop"
  93. onclick="this.parentNode.parentNode.removeChild
  94.  
  95. (this.parentNode);" />
  96.  
  97. </div>
  98.  
  99. <!-- End clonable section. Clonable section will be written at "writeroot" -->
  100.  
  101.  
  102.  
  103. <div id="container">
  104.  
  105.  
  106. <span id="writeroot"></span>
  107.  
  108. <table border="0"
  109. cellpadding="0"
  110. cellspacing="0"
  111. width="90%"
  112. bgcolor="#FFFFFF">
  113. <tr>
  114. <td align="right"
  115. colspan="2">
  116.  
  117. <input type="button" id="" onclick="moreFields()" value="Add another workshop"
  118. height="20"
  119.  
  120. />
  121.  
  122. <input type="submit"
  123.  
  124. value="Submit"
  125. width="65"
  126. height="20"
  127. border="0"
  128. alt="Submit Form"
  129. name="Submit"
  130.  
  131. id="Submit" /></td>
  132. </tr>
  133.  
  134.  
  135.  
  136. <br />
  137. <br />
  138. </td>
  139. </tr>
  140. </table>
  141. </form>
  142. </td>
  143. </tr>
  144. </table>
  145. </div>
  146. <br /><br />
  147. </body>
  148. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement