Help with Dynamic text boxes

  • sheraz79
  • Newbie
  • Newbie
  • sheraz79
  • Posts: 6

Post 3+ Months Ago

Hi There,

How are you,

I have a order form ,that has a option to add text boxes dynamically.
So the user can add boxes as they like and enter their details in these text boxes.

there are some fixed text boxes are present on this form.I have no problem getting values/data from these text boxes.I set it up to send details from this form to my email address.

I'm wondering how can I get data from dynamically text boxes that are add by user.


Thank You

God Bless You.
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

what do you call the textbox when it gets created? which server side language are you using to pull the data from the textboxes? how are you creating the textboxes dynamically?
  • sheraz79
  • Newbie
  • Newbie
  • sheraz79
  • Posts: 6

Post 3+ Months Ago

Hi ,

I'm using Java. I'm not not sure when what it called after text box is created.

I'm using form in front page to emails the detail of this page.
Thank You.
here is html...


Code: [ Select ]
<html>
 
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>dynamic</title>
</head>
 
<body>
<HEAD>
 
<TITLE>dynamic</TITLE>
 
 
<script language="javascript">
 
<!--
var rownum=1
 
function addRow(el)
{
targEl=document.getElementById(el);
var tbody = targEl.getElementsByTagName("tbody")[1];
rownum=Number(targEl.getElementsByTagName('tr')[(targEl.rows.length-1)].getElementsByTagName('td')[0].getElementsByTagName('input')[0].value);
rownum+=1;
var row = document.createElement("TR");
 
 
var cell0 = document.createElement("TD");
var inp0 = document.createElement("INPUT");
inp0.setAttribute("type","text");
inp0.setAttribute("name","Sno" + rownum);
inp0.setAttribute("size","2");
inp0.setAttribute("value", rownum);
inp0.setAttribute("disabled", true);
cell0.appendChild(inp0);
 
 
var cell1 = document.createElement("TD");
var inp1 = document.createElement("INPUT");
inp1.setAttribute("type","text");
inp1.setAttribute("name","Product" + rownum);
inp1.setAttribute("size","45");
inp1.setAttribute("value","");
cell1.appendChild(inp1);
 
 
var cell2 = document.createElement("TD");
var inp2 = document.createElement("INPUT");
inp2.setAttribute("type","text");
inp2.setAttribute("name","Manufacture" + rownum);
inp2.setAttribute("size","45");
inp2.setAttribute("value","");
cell2.appendChild(inp2);
 
 
row.appendChild(cell0);
row.appendChild(cell1);
row.appendChild(cell2);
 
tbody.appendChild(row);
}
 
function validate(the)
{
i=document.FORM1.Drop1.value;
alert(i);
i= document.FORM1.Drop2.value;
 
alert(i)
 
submit();
 
 
}
 
 
-->
 
 
 
 
</SCRIPT>
 
 
 
</HEAD>
<BODY>
 
 
<P>
 
<form method="POST" action="--WEBBOT-SELF--" onSubmit="location.href='_derived/nortbots.htm';return false;" webbot-onSubmit>
  <!--webbot bot="SaveResults" u-file="_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" s-email-address="" s-email-format="TEXT/PRE" startspan --><strong>[FrontPage Save Results Component]</strong><!--webbot bot="SaveResults" endspan i-checksum="6561" --><p>&nbsp;</p>
 
<p align=center> <b>
<U>ABCTOZ</U>
</P>
  <p>
&nbsp;</p>
 
  <p>
&nbsp;</p>
 
  <p>
&nbsp;</p>
 
  <p>
<br>
<br>
 
  </p>
 
<table id="1st" cellSpacing=1 cellPadding=1 border=10>
<TR >
<TD rowSpan=2 size=4>&nbsp;No</TD>
<TD colSpan=2>
<CENTER >
<p>Please Enter Your Order Details Here </p>
</CENTER>
<p align="left"><b>1st Store Name</b><input type="text" name="T1" size="47"></p>
</TD>
</TR>
<TR>
<TD>
<CENTER>
<p> <b>
Product</b></p>
</CENTER></TD>
<TD>
<CENTER>
<p><select size="1" name="D1">
<option selected value="Select">Select</option>
<option>Manufacturer</option>
<option>Size/Topping</option>
</select></p>
</CENTER></TD>
</TR>
<tbody>
<TR name=row1 >
<TD ><input type="text" name="Sno" size=2 value=1 disabled></TD>
<TD><input type="text" name="Product" size=45></TD>
<TD><input type="text" name="Manufacture" size=45></TD>
 
</TR>
</tbody>
</table>
 
  <p>
 
 
<input type="button" value="Add A Box For 1st Store!" onClick="addRow('1st');">&nbsp; </p>
  </b>
 
  <table id="2nd" cellSpacing=1 cellPadding=1 border=1>
<TR >
<TD rowSpan=2 size=4>&nbsp;No</TD>
<TD colSpan=2>
<CENTER >
<p>Please Enter Your Order Details Here</p>
</CENTER>
<p align="left"><b>2nd Store Name<input type="text" name="T2" size="47"></b></p>
</TD>
</TR>
<TR>
<TD>
<CENTER>
<p>Product</p>
</CENTER></TD>
<TD>
<CENTER>
<p><select size="1" name="D2">
<option selected value="Select">Select</option>
<option value="Manufacturer">Manufacturer</option>
<option value="Size/Topping">Size/Topping</option>
</select></p>
</CENTER></TD>
</TR>
<tbody>
<TR name=row1 >
<TD ><input type="text" name="Sno" size=2 value=1 disabled></TD>
<TD><input type="text" name="Product" size=45></TD>
<TD><input type="text" name="Manufacture" size=45></TD>
 
</TR>
</tbody>
</table>
 
  <p>
 
<input type="button" value="Add A Box For 2nd Store!" onClick="addRow('2nd');">&nbsp; </p>
 
 
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
  1. <html>
  2.  
  3. <head>
  4. <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
  5. <meta name="ProgId" content="FrontPage.Editor.Document">
  6. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  7. <title>dynamic</title>
  8. </head>
  9.  
  10. <body>
  11. <HEAD>
  12.  
  13. <TITLE>dynamic</TITLE>
  14.  
  15.  
  16. <script language="javascript">
  17.  
  18. <!--
  19. var rownum=1
  20.  
  21. function addRow(el)
  22. {
  23. targEl=document.getElementById(el);
  24. var tbody = targEl.getElementsByTagName("tbody")[1];
  25. rownum=Number(targEl.getElementsByTagName('tr')[(targEl.rows.length-1)].getElementsByTagName('td')[0].getElementsByTagName('input')[0].value);
  26. rownum+=1;
  27. var row = document.createElement("TR");
  28.  
  29.  
  30. var cell0 = document.createElement("TD");
  31. var inp0 = document.createElement("INPUT");
  32. inp0.setAttribute("type","text");
  33. inp0.setAttribute("name","Sno" + rownum);
  34. inp0.setAttribute("size","2");
  35. inp0.setAttribute("value", rownum);
  36. inp0.setAttribute("disabled", true);
  37. cell0.appendChild(inp0);
  38.  
  39.  
  40. var cell1 = document.createElement("TD");
  41. var inp1 = document.createElement("INPUT");
  42. inp1.setAttribute("type","text");
  43. inp1.setAttribute("name","Product" + rownum);
  44. inp1.setAttribute("size","45");
  45. inp1.setAttribute("value","");
  46. cell1.appendChild(inp1);
  47.  
  48.  
  49. var cell2 = document.createElement("TD");
  50. var inp2 = document.createElement("INPUT");
  51. inp2.setAttribute("type","text");
  52. inp2.setAttribute("name","Manufacture" + rownum);
  53. inp2.setAttribute("size","45");
  54. inp2.setAttribute("value","");
  55. cell2.appendChild(inp2);
  56.  
  57.  
  58. row.appendChild(cell0);
  59. row.appendChild(cell1);
  60. row.appendChild(cell2);
  61.  
  62. tbody.appendChild(row);
  63. }
  64.  
  65. function validate(the)
  66. {
  67. i=document.FORM1.Drop1.value;
  68. alert(i);
  69. i= document.FORM1.Drop2.value;
  70.  
  71. alert(i)
  72.  
  73. submit();
  74.  
  75.  
  76. }
  77.  
  78.  
  79. -->
  80.  
  81.  
  82.  
  83.  
  84. </SCRIPT>
  85.  
  86.  
  87.  
  88. </HEAD>
  89. <BODY>
  90.  
  91.  
  92. <P>
  93.  
  94. <form method="POST" action="--WEBBOT-SELF--" onSubmit="location.href='_derived/nortbots.htm';return false;" webbot-onSubmit>
  95.   <!--webbot bot="SaveResults" u-file="_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" s-email-address="" s-email-format="TEXT/PRE" startspan --><strong>[FrontPage Save Results Component]</strong><!--webbot bot="SaveResults" endspan i-checksum="6561" --><p>&nbsp;</p>
  96.  
  97. <p align=center> <b>
  98. <U>ABCTOZ</U>
  99. </P>
  100.   <p>
  101. &nbsp;</p>
  102.  
  103.   <p>
  104. &nbsp;</p>
  105.  
  106.   <p>
  107. &nbsp;</p>
  108.  
  109.   <p>
  110. <br>
  111. <br>
  112.  
  113.   </p>
  114.  
  115. <table id="1st" cellSpacing=1 cellPadding=1 border=10>
  116. <TR >
  117. <TD rowSpan=2 size=4>&nbsp;No</TD>
  118. <TD colSpan=2>
  119. <CENTER >
  120. <p>Please Enter Your Order Details Here </p>
  121. </CENTER>
  122. <p align="left"><b>1st Store Name</b><input type="text" name="T1" size="47"></p>
  123. </TD>
  124. </TR>
  125. <TR>
  126. <TD>
  127. <CENTER>
  128. <p> <b>
  129. Product</b></p>
  130. </CENTER></TD>
  131. <TD>
  132. <CENTER>
  133. <p><select size="1" name="D1">
  134. <option selected value="Select">Select</option>
  135. <option>Manufacturer</option>
  136. <option>Size/Topping</option>
  137. </select></p>
  138. </CENTER></TD>
  139. </TR>
  140. <tbody>
  141. <TR name=row1 >
  142. <TD ><input type="text" name="Sno" size=2 value=1 disabled></TD>
  143. <TD><input type="text" name="Product" size=45></TD>
  144. <TD><input type="text" name="Manufacture" size=45></TD>
  145.  
  146. </TR>
  147. </tbody>
  148. </table>
  149.  
  150.   <p>
  151.  
  152.  
  153. <input type="button" value="Add A Box For 1st Store!" onClick="addRow('1st');">&nbsp; </p>
  154.   </b>
  155.  
  156.   <table id="2nd" cellSpacing=1 cellPadding=1 border=1>
  157. <TR >
  158. <TD rowSpan=2 size=4>&nbsp;No</TD>
  159. <TD colSpan=2>
  160. <CENTER >
  161. <p>Please Enter Your Order Details Here</p>
  162. </CENTER>
  163. <p align="left"><b>2nd Store Name<input type="text" name="T2" size="47"></b></p>
  164. </TD>
  165. </TR>
  166. <TR>
  167. <TD>
  168. <CENTER>
  169. <p>Product</p>
  170. </CENTER></TD>
  171. <TD>
  172. <CENTER>
  173. <p><select size="1" name="D2">
  174. <option selected value="Select">Select</option>
  175. <option value="Manufacturer">Manufacturer</option>
  176. <option value="Size/Topping">Size/Topping</option>
  177. </select></p>
  178. </CENTER></TD>
  179. </TR>
  180. <tbody>
  181. <TR name=row1 >
  182. <TD ><input type="text" name="Sno" size=2 value=1 disabled></TD>
  183. <TD><input type="text" name="Product" size=45></TD>
  184. <TD><input type="text" name="Manufacture" size=45></TD>
  185.  
  186. </TR>
  187. </tbody>
  188. </table>
  189.  
  190.   <p>
  191.  
  192. <input type="button" value="Add A Box For 2nd Store!" onClick="addRow('2nd');">&nbsp; </p>
  193.  
  194.  
  195.   <p>&nbsp;</p>
  196.   <p>&nbsp;</p>
  197.   <p>&nbsp;</p>
  198.   <p>&nbsp;</p>
  199.   <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
  200. </form>
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

I see you're using frontpage here, that does make it more difficult to understand what it is trying to do, seeing as it's not a very clean good web developing tool ...

anyway, please just reply here tomorrow, so I can see it again (the topic) ... I can't focus right now as I need some sleep ...
  • sheraz79
  • Newbie
  • Newbie
  • sheraz79
  • Posts: 6

Post 3+ Months Ago

1. <html>
2.
3. <head>
4. <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
5. <meta name="ProgId" content="FrontPage.Editor.Document">
6. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
7. <title>dynamic</title>
8. </head>
9.
10. <body>
11. <HEAD>
12.
13. <TITLE>dynamic</TITLE>
14.
15.
16. <script language="javascript">
17.
18. <!--
19. var rownum=1
20.
21. function addRow(el)
22. {
23. targEl=document.getElementById(el);
24. var tbody = targEl.getElementsByTagName("tbody")[1];
25. rownum=Number(targEl.getElementsByTagName('tr')[(targEl.rows.length-1)].getElementsByTagName('td')[0].getElementsByTagName('input')[0].value);
26. rownum+=1;
27. var row = document.createElement("TR");
28.
29.
30. var cell0 = document.createElement("TD");
31. var inp0 = document.createElement("INPUT");
32. inp0.setAttribute("type","text");
33. inp0.setAttribute("name","Sno" + rownum);
34. inp0.setAttribute("size","2");
35. inp0.setAttribute("value", rownum);
36. inp0.setAttribute("disabled", true);
37. cell0.appendChild(inp0);
38.
39.
40. var cell1 = document.createElement("TD");
41. var inp1 = document.createElement("INPUT");
42. inp1.setAttribute("type","text");
43. inp1.setAttribute("name","Product" + rownum);
44. inp1.setAttribute("size","45");
45. inp1.setAttribute("value","");
46. cell1.appendChild(inp1);
47.
48.
49. var cell2 = document.createElement("TD");
50. var inp2 = document.createElement("INPUT");
51. inp2.setAttribute("type","text");
52. inp2.setAttribute("name","Manufacture" + rownum);
53. inp2.setAttribute("size","45");
54. inp2.setAttribute("value","");
55. cell2.appendChild(inp2);
56.
57.
58. row.appendChild(cell0);
59. row.appendChild(cell1);
60. row.appendChild(cell2);
61.
62. tbody.appendChild(row);
63. }
64.
65. function validate(the)
66. {
67. i=document.FORM1.Drop1.value;
68. alert(i);
69. i= document.FORM1.Drop2.value;
70.
71. alert(i)
72.
73. submit();
74.
75.
76. }
77.
78.
79. -->
80.
81.
82.
83.
84. </SCRIPT>
85.
86.
87.
88. </HEAD>
89. <BODY>
90.
91.
92. <P>
93.
94. <form method="POST" action="--WEBBOT-SELF--" onSubmit="location.href='_derived/nortbots.htm';return false;" webbot-onSubmit>
95. <!--webbot bot="SaveResults" u-file="_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" s-email-address="" s-email-format="TEXT/PRE" startspan --><strong>[FrontPage Save Results Component]</strong><!--webbot bot="SaveResults" endspan i-checksum="6561" --><p>&nbsp;</p>
96.
97. <p align=center> <b>
98. <U>ABCTOZ</U>
99. </P>
100. <p>
101. &nbsp;</p>
102.
103. <p>
104. &nbsp;</p>
105.
106. <p>
107. &nbsp;</p>
108.
109. <p>
110. <br>
111. <br>
112.
113. </p>
114.
115. <table id="1st" cellSpacing=1 cellPadding=1 border=10>
116. <TR >
117. <TD rowSpan=2 size=4>&nbsp;No</TD>
118. <TD colSpan=2>
119. <CENTER >
120. <p>Please Enter Your Order Details Here </p>
121. </CENTER>
122. <p align="left"><b>1st Store Name</b><input type="text" name="T1" size="47"></p>
123. </TD>
124. </TR>
125. <TR>
126. <TD>
127. <CENTER>
128. <p> <b>
129. Product</b></p>
130. </CENTER></TD>
131. <TD>
132. <CENTER>
133. <p><select size="1" name="D1">
134. <option selected value="Select">Select</option>
135. <option>Manufacturer</option>
136. <option>Size/Topping</option>
137. </select></p>
138. </CENTER></TD>
139. </TR>
140. <tbody>
141. <TR name=row1 >
142. <TD ><input type="text" name="Sno" size=2 value=1 disabled></TD>
143. <TD><input type="text" name="Product" size=45></TD>
144. <TD><input type="text" name="Manufacture" size=45></TD>
145.
146. </TR>
147. </tbody>
148. </table>
149.
150. <p>
151.
152.
153. <input type="button" value="Add A Box For 1st Store!" onClick="addRow('1st');">&nbsp; </p>
154. </b>
155.
156. <table id="2nd" cellSpacing=1 cellPadding=1 border=1>
157. <TR >
158. <TD rowSpan=2 size=4>&nbsp;No</TD>
159. <TD colSpan=2>
160. <CENTER >
161. <p>Please Enter Your Order Details Here</p>
162. </CENTER>
163. <p align="left"><b>2nd Store Name<input type="text" name="T2" size="47"></b></p>
164. </TD>
165. </TR>
166. <TR>
167. <TD>
168. <CENTER>
169. <p>Product</p>
170. </CENTER></TD>
171. <TD>
172. <CENTER>
173. <p><select size="1" name="D2">
174. <option selected value="Select">Select</option>
175. <option value="Manufacturer">Manufacturer</option>
176. <option value="Size/Topping">Size/Topping</option>
177. </select></p>
178. </CENTER></TD>
179. </TR>
180. <tbody>
181. <TR name=row1 >
182. <TD ><input type="text" name="Sno" size=2 value=1 disabled></TD>
183. <TD><input type="text" name="Product" size=45></TD>
184. <TD><input type="text" name="Manufacture" size=45></TD>
185.
186. </TR>
187. </tbody>
188. </table>
189.
190. <p>
191.
192. <input type="button" value="Add A Box For 2nd Store!" onClick="addRow('2nd');">&nbsp; </p>
193.
194.
195. <p>&nbsp;</p>
196. <p>&nbsp;</p>
197. <p>&nbsp;</p>
198. <p>&nbsp;</p>
199. <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
200. </form>
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

okay I haven't done anything about your problem yet, I just sorted out your code real quick, so that it actually looks like a human being created all that and that other people could read it a little easier:
Code: [ Select ]
<html>
<head>
<title>dynamic</title>
<script language="javascript">
<!--
var rownum=1
function addRow(el)
    {
    targEl=document.getElementById(el);
    var tbody = targEl.getElementsByTagName("tbody")[1];
    rownum=Number(targEl.getElementsByTagName('tr')[(targEl.rows.length-1)].getElementsByTagName('td')[0].getElementsByTagName('input')[0].value);
    rownum+=1;
    var row = document.createElement("TR");

    var cell0 = document.createElement("TD");
    var inp0 = document.createElement("INPUT");
    inp0.setAttribute("type","text");
    inp0.setAttribute("name","Sno" + rownum);
    inp0.setAttribute("size","2");
    inp0.setAttribute("value", rownum);
    inp0.setAttribute("disabled", true);
    cell0.appendChild(inp0);

    var cell1 = document.createElement("TD");
    var inp1 = document.createElement("INPUT");
    inp1.setAttribute("type","text");
    inp1.setAttribute("name","Product" + rownum);
    inp1.setAttribute("size","45");
    inp1.setAttribute("value","");
    cell1.appendChild(inp1);

    var cell2 = document.createElement("TD");
    var inp2 = document.createElement("INPUT");
    inp2.setAttribute("type","text");
    inp2.setAttribute("name","Manufacture" + rownum);
    inp2.setAttribute("size","45");
    inp2.setAttribute("value","");
    cell2.appendChild(inp2);

    row.appendChild(cell0);
    row.appendChild(cell1);
    row.appendChild(cell2);

    tbody.appendChild(row);
    }

function validate(the)
    {
    i=document.FORM1.Drop1.value;
    alert(i);
    i= document.FORM1.Drop2.value;
    alert(i)
    submit();
    }
    -->
</script>
</head>
<body>
<form method="POST" action="--WEBBOT-SELF--" onSubmit="location.href='_derived/nortbots.htm';return false;" webbot-onSubmit>
<!--webbot bot="SaveResults" u-file="_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" s-email-address="" s-email-format="TEXT/PRE" startspan --><strong>[FrontPage Save Results Component]</strong><!--webbot bot="SaveResults" endspan i-checksum="6561" --><p>&nbsp;</p>
<p align=center><b><u>ABCTOZ</u></b></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><br><br></p>
<table id="1st" cellSpacing=1 cellPadding=1 border=10>
    <tr>
    <td rowSpan='2' style='text-align:center;'>&nbsp;No</td>
    <td colSpan='2' style='text-align:left;'>
     <p>Please Enter Your Order Details Here </p>
     <p align="left"><b>1st Store Name</b><input type="text" name="T1" size="47"></p>
    </td>
    </tr>
    <tr>
    <td style='text-align:center;'>
     <p><b>Product</b></p>
    </td>
    <td style='text-align:center'>
     <p>
     <select size="1" name="D1">
        <option selected value="Select">Select</option>
        <option>Manufacturer</option>
        <option>Size/Topping</option>
     </select></p>
    </td>
    </tr>
    <tbody>
    <tr name=row1 >
     <td><input type="text" name="Sno" size=2 value=1 disabled></td>
     <td><input type="text" name="Product" size=45></td>
     <td><input type="text" name="Manufacture" size=45></td>
    </tr>
    </tbody>
</table>
<p>
    <input type="button" value="Add A Box For 1st Store!" onClick="addRow('1st');">&nbsp;
</p>
<table id="2nd" cellSpacing=1 cellPadding=1 border=1>
    <tr>
    <td rowSpan='2' size='4'>&nbsp;No</TD>
    <td colSpan='2' style='text-align:center'>
     <p>Please Enter Your Order Details Here</p>
     <p align="left"><b>2nd Store Name<input type="text" name="T2" size="47">s</p>
    </td>
    </tr>
    <tr>
    <td style='text-align:center;'>
     <p>Product</p>
    </td>
    <td style='text-align:center;'>
     <p>
     <select size="1" name="D2">
        <option selected value="Select">Select</option>
        <option value="Manufacturer">Manufacturer</option>
        <option value="Size/Topping">Size/Topping</option>
     </select>
     </p>
    </td>
    </tr>
    <tbody>
    <tr name=row1 >
     <td><input type="text" name="Sno" size=2 value=1 disabled></td>
     <td><input type="text" name="Product" size=45></td>
     <td><input type="text" name="Manufacture" size=45></td>
    </tr>
    </tbody>
</table>
<p>
<input type="button" value="Add A Box For 2nd Store!" onClick="addRow('2nd');">&nbsp; </p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
</body>
</html>
  1. <html>
  2. <head>
  3. <title>dynamic</title>
  4. <script language="javascript">
  5. <!--
  6. var rownum=1
  7. function addRow(el)
  8.     {
  9.     targEl=document.getElementById(el);
  10.     var tbody = targEl.getElementsByTagName("tbody")[1];
  11.     rownum=Number(targEl.getElementsByTagName('tr')[(targEl.rows.length-1)].getElementsByTagName('td')[0].getElementsByTagName('input')[0].value);
  12.     rownum+=1;
  13.     var row = document.createElement("TR");
  14.     var cell0 = document.createElement("TD");
  15.     var inp0 = document.createElement("INPUT");
  16.     inp0.setAttribute("type","text");
  17.     inp0.setAttribute("name","Sno" + rownum);
  18.     inp0.setAttribute("size","2");
  19.     inp0.setAttribute("value", rownum);
  20.     inp0.setAttribute("disabled", true);
  21.     cell0.appendChild(inp0);
  22.     var cell1 = document.createElement("TD");
  23.     var inp1 = document.createElement("INPUT");
  24.     inp1.setAttribute("type","text");
  25.     inp1.setAttribute("name","Product" + rownum);
  26.     inp1.setAttribute("size","45");
  27.     inp1.setAttribute("value","");
  28.     cell1.appendChild(inp1);
  29.     var cell2 = document.createElement("TD");
  30.     var inp2 = document.createElement("INPUT");
  31.     inp2.setAttribute("type","text");
  32.     inp2.setAttribute("name","Manufacture" + rownum);
  33.     inp2.setAttribute("size","45");
  34.     inp2.setAttribute("value","");
  35.     cell2.appendChild(inp2);
  36.     row.appendChild(cell0);
  37.     row.appendChild(cell1);
  38.     row.appendChild(cell2);
  39.     tbody.appendChild(row);
  40.     }
  41. function validate(the)
  42.     {
  43.     i=document.FORM1.Drop1.value;
  44.     alert(i);
  45.     i= document.FORM1.Drop2.value;
  46.     alert(i)
  47.     submit();
  48.     }
  49.     -->
  50. </script>
  51. </head>
  52. <body>
  53. <form method="POST" action="--WEBBOT-SELF--" onSubmit="location.href='_derived/nortbots.htm';return false;" webbot-onSubmit>
  54. <!--webbot bot="SaveResults" u-file="_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" s-email-address="" s-email-format="TEXT/PRE" startspan --><strong>[FrontPage Save Results Component]</strong><!--webbot bot="SaveResults" endspan i-checksum="6561" --><p>&nbsp;</p>
  55. <p align=center><b><u>ABCTOZ</u></b></p>
  56. <p>&nbsp;</p>
  57. <p>&nbsp;</p>
  58. <p>&nbsp;</p>
  59. <p><br><br></p>
  60. <table id="1st" cellSpacing=1 cellPadding=1 border=10>
  61.     <tr>
  62.     <td rowSpan='2' style='text-align:center;'>&nbsp;No</td>
  63.     <td colSpan='2' style='text-align:left;'>
  64.      <p>Please Enter Your Order Details Here </p>
  65.      <p align="left"><b>1st Store Name</b><input type="text" name="T1" size="47"></p>
  66.     </td>
  67.     </tr>
  68.     <tr>
  69.     <td style='text-align:center;'>
  70.      <p><b>Product</b></p>
  71.     </td>
  72.     <td style='text-align:center'>
  73.      <p>
  74.      <select size="1" name="D1">
  75.         <option selected value="Select">Select</option>
  76.         <option>Manufacturer</option>
  77.         <option>Size/Topping</option>
  78.      </select></p>
  79.     </td>
  80.     </tr>
  81.     <tbody>
  82.     <tr name=row1 >
  83.      <td><input type="text" name="Sno" size=2 value=1 disabled></td>
  84.      <td><input type="text" name="Product" size=45></td>
  85.      <td><input type="text" name="Manufacture" size=45></td>
  86.     </tr>
  87.     </tbody>
  88. </table>
  89. <p>
  90.     <input type="button" value="Add A Box For 1st Store!" onClick="addRow('1st');">&nbsp;
  91. </p>
  92. <table id="2nd" cellSpacing=1 cellPadding=1 border=1>
  93.     <tr>
  94.     <td rowSpan='2' size='4'>&nbsp;No</TD>
  95.     <td colSpan='2' style='text-align:center'>
  96.      <p>Please Enter Your Order Details Here</p>
  97.      <p align="left"><b>2nd Store Name<input type="text" name="T2" size="47">s</p>
  98.     </td>
  99.     </tr>
  100.     <tr>
  101.     <td style='text-align:center;'>
  102.      <p>Product</p>
  103.     </td>
  104.     <td style='text-align:center;'>
  105.      <p>
  106.      <select size="1" name="D2">
  107.         <option selected value="Select">Select</option>
  108.         <option value="Manufacturer">Manufacturer</option>
  109.         <option value="Size/Topping">Size/Topping</option>
  110.      </select>
  111.      </p>
  112.     </td>
  113.     </tr>
  114.     <tbody>
  115.     <tr name=row1 >
  116.      <td><input type="text" name="Sno" size=2 value=1 disabled></td>
  117.      <td><input type="text" name="Product" size=45></td>
  118.      <td><input type="text" name="Manufacture" size=45></td>
  119.     </tr>
  120.     </tbody>
  121. </table>
  122. <p>
  123. <input type="button" value="Add A Box For 2nd Store!" onClick="addRow('2nd');">&nbsp; </p>
  124. <p>&nbsp;</p>
  125. <p>&nbsp;</p>
  126. <p>&nbsp;</p>
  127. <p>&nbsp;</p>
  128. <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
  129. </form>
  130. </body>
  131. </html>
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

if you have a look at the "action" part of the form, you see that it is set to "--WEBBOT SELF--" which I don't know what that means ... If your server supports php I can write you a quick script to properly send/submit this form ... do you know if your host supports php?
  • sheraz79
  • Newbie
  • Newbie
  • sheraz79
  • Posts: 6

Post 3+ Months Ago

yes it does.
  • sheraz79
  • Newbie
  • Newbie
  • sheraz79
  • Posts: 6

Post 3+ Months Ago

Well when I use form option in front page ,it comes automatically "method=post action= webbot"

because I'm getting all data from this form to an email address. this is why.
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

Your Page:
Code: [ Select ]
<html>
<head>
<title>dynamic</title>
<script language="javascript">
<!--
var rownum=1
function addRow(el)
    {
    targEl=document.getElementById(el);
    var tbody = targEl.getElementsByTagName("tbody")[1];
    rownum=Number(targEl.getElementsByTagName('tr')[(targEl.rows.length-1)].getElementsByTagName('td')[0].getElementsByTagName('input')[0].value);
    rownum+=1;
    var row = document.createElement("tr");

    var cell0 = document.createElement("td");
    var inp0 = document.createElement("input");
    inp0.setAttribute("type","text");
    inp0.setAttribute("name","Sno1[]");
    inp0.setAttribute("size","2");
    inp0.setAttribute("value", rownum);
    inp0.setAttribute("disabled", true);
    cell0.appendChild(inp0);

    var cell1 = document.createElement("td");
    var inp1 = document.createElement("input");
    inp1.setAttribute("type","text");
    inp1.setAttribute("name","Product1[]");
    inp1.setAttribute("size","45");
    inp1.setAttribute("value","");
    cell1.appendChild(inp1);

    var cell2 = document.createElement("td");
    var inp2 = document.createElement("input");
    inp2.setAttribute("type","text");
    inp2.setAttribute("name","Manufacture1[]");
    inp2.setAttribute("size","45");
    inp2.setAttribute("value","");
    cell2.appendChild(inp2);

    row.appendChild(cell0);
    row.appendChild(cell1);
    row.appendChild(cell2);

    tbody.appendChild(row);
    }

function validate(the)
    {
    i=document.FORM1.Drop1.value;
    alert(i);
    i= document.FORM1.Drop2.value;
    alert(i)
    submit();
    }
    -->
</script>
</head>
<body>
<form method="POST" action="submit_form.php">
<p align=center><b><u>ABCTOZ</u></b></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><br><br></p>
<table id="1st" cellSpacing=1 cellPadding=1 border=10>
    <tr>
    <td rowSpan='2' style='text-align:center;'>&nbsp;No</td>
    <td colSpan='2' style='text-align:left;'>
     <p>Please Enter Your Order Details Here </p>
     <p align="left"><b>1st Store Name</b><input type="text" name="T1" size="47"></p>
    </td>
    </tr>
    <tr>
    <td style='text-align:center;'>
     <p><b>Product</b></p>
    </td>
    <td style='text-align:center'>
     <p>
     <select size="1" name="D1">
        <option selected value="Select">Select</option>
        <option>Manufacturer</option>
        <option>Size/Topping</option>
     </select></p>
    </td>
    </tr>
    <tbody>
    <tr name=row1 >
     <td><input type="text" name="Sno" size=2 value=1 disabled></td>
     <td><input type="text" name="Product" size=45></td>
     <td><input type="text" name="Manufacture" size=45></td>
    </tr>
    </tbody>
</table>
<p>
    <input type="button" value="Add A Box For 1st Store!" onClick="addRow('1st');">&nbsp;
</p>
<table id="2nd" cellSpacing=1 cellPadding=1 border=1>
    <tr>
    <td rowSpan='2' size='4'>&nbsp;No</TD>
    <td colSpan='2' style='text-align:center'>
     <p>Please Enter Your Order Details Here</p>
     <p align="left"><b>2nd Store Name<input type="text" name="T2" size="47">s</p>
    </td>
    </tr>
    <tr>
    <td style='text-align:center;'>
     <p>Product</p>
    </td>
    <td style='text-align:center;'>
     <p>
     <select size="1" name="D2">
        <option selected value="Select">Select</option>
        <option value="Manufacturer">Manufacturer</option>
        <option value="Size/Topping">Size/Topping</option>
     </select>
     </p>
    </td>
    </tr>
    <tbody>
    <tr name=row1 >
     <td><input type="text" name="Sno" size=2 value=1 disabled></td>
     <td><input type="text" name="Product" size=45></td>
     <td><input type="text" name="Manufacture" size=45></td>
    </tr>
    </tbody>
</table>
<p>
<input type="button" value="Add A Box For 2nd Store!" onClick="addRow('2nd');">&nbsp; </p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
</body>
</html>
  1. <html>
  2. <head>
  3. <title>dynamic</title>
  4. <script language="javascript">
  5. <!--
  6. var rownum=1
  7. function addRow(el)
  8.     {
  9.     targEl=document.getElementById(el);
  10.     var tbody = targEl.getElementsByTagName("tbody")[1];
  11.     rownum=Number(targEl.getElementsByTagName('tr')[(targEl.rows.length-1)].getElementsByTagName('td')[0].getElementsByTagName('input')[0].value);
  12.     rownum+=1;
  13.     var row = document.createElement("tr");
  14.     var cell0 = document.createElement("td");
  15.     var inp0 = document.createElement("input");
  16.     inp0.setAttribute("type","text");
  17.     inp0.setAttribute("name","Sno1[]");
  18.     inp0.setAttribute("size","2");
  19.     inp0.setAttribute("value", rownum);
  20.     inp0.setAttribute("disabled", true);
  21.     cell0.appendChild(inp0);
  22.     var cell1 = document.createElement("td");
  23.     var inp1 = document.createElement("input");
  24.     inp1.setAttribute("type","text");
  25.     inp1.setAttribute("name","Product1[]");
  26.     inp1.setAttribute("size","45");
  27.     inp1.setAttribute("value","");
  28.     cell1.appendChild(inp1);
  29.     var cell2 = document.createElement("td");
  30.     var inp2 = document.createElement("input");
  31.     inp2.setAttribute("type","text");
  32.     inp2.setAttribute("name","Manufacture1[]");
  33.     inp2.setAttribute("size","45");
  34.     inp2.setAttribute("value","");
  35.     cell2.appendChild(inp2);
  36.     row.appendChild(cell0);
  37.     row.appendChild(cell1);
  38.     row.appendChild(cell2);
  39.     tbody.appendChild(row);
  40.     }
  41. function validate(the)
  42.     {
  43.     i=document.FORM1.Drop1.value;
  44.     alert(i);
  45.     i= document.FORM1.Drop2.value;
  46.     alert(i)
  47.     submit();
  48.     }
  49.     -->
  50. </script>
  51. </head>
  52. <body>
  53. <form method="POST" action="submit_form.php">
  54. <p align=center><b><u>ABCTOZ</u></b></p>
  55. <p>&nbsp;</p>
  56. <p>&nbsp;</p>
  57. <p>&nbsp;</p>
  58. <p><br><br></p>
  59. <table id="1st" cellSpacing=1 cellPadding=1 border=10>
  60.     <tr>
  61.     <td rowSpan='2' style='text-align:center;'>&nbsp;No</td>
  62.     <td colSpan='2' style='text-align:left;'>
  63.      <p>Please Enter Your Order Details Here </p>
  64.      <p align="left"><b>1st Store Name</b><input type="text" name="T1" size="47"></p>
  65.     </td>
  66.     </tr>
  67.     <tr>
  68.     <td style='text-align:center;'>
  69.      <p><b>Product</b></p>
  70.     </td>
  71.     <td style='text-align:center'>
  72.      <p>
  73.      <select size="1" name="D1">
  74.         <option selected value="Select">Select</option>
  75.         <option>Manufacturer</option>
  76.         <option>Size/Topping</option>
  77.      </select></p>
  78.     </td>
  79.     </tr>
  80.     <tbody>
  81.     <tr name=row1 >
  82.      <td><input type="text" name="Sno" size=2 value=1 disabled></td>
  83.      <td><input type="text" name="Product" size=45></td>
  84.      <td><input type="text" name="Manufacture" size=45></td>
  85.     </tr>
  86.     </tbody>
  87. </table>
  88. <p>
  89.     <input type="button" value="Add A Box For 1st Store!" onClick="addRow('1st');">&nbsp;
  90. </p>
  91. <table id="2nd" cellSpacing=1 cellPadding=1 border=1>
  92.     <tr>
  93.     <td rowSpan='2' size='4'>&nbsp;No</TD>
  94.     <td colSpan='2' style='text-align:center'>
  95.      <p>Please Enter Your Order Details Here</p>
  96.      <p align="left"><b>2nd Store Name<input type="text" name="T2" size="47">s</p>
  97.     </td>
  98.     </tr>
  99.     <tr>
  100.     <td style='text-align:center;'>
  101.      <p>Product</p>
  102.     </td>
  103.     <td style='text-align:center;'>
  104.      <p>
  105.      <select size="1" name="D2">
  106.         <option selected value="Select">Select</option>
  107.         <option value="Manufacturer">Manufacturer</option>
  108.         <option value="Size/Topping">Size/Topping</option>
  109.      </select>
  110.      </p>
  111.     </td>
  112.     </tr>
  113.     <tbody>
  114.     <tr name=row1 >
  115.      <td><input type="text" name="Sno" size=2 value=1 disabled></td>
  116.      <td><input type="text" name="Product" size=45></td>
  117.      <td><input type="text" name="Manufacture" size=45></td>
  118.     </tr>
  119.     </tbody>
  120. </table>
  121. <p>
  122. <input type="button" value="Add A Box For 2nd Store!" onClick="addRow('2nd');">&nbsp; </p>
  123. <p>&nbsp;</p>
  124. <p>&nbsp;</p>
  125. <p>&nbsp;</p>
  126. <p>&nbsp;</p>
  127. <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
  128. </form>
  129. </body>
  130. </html>


submit_form.php
Code: [ Select ]
<?php


//these should be changed

$to = "mail@mail.com";
$from = "mail@mail.com";
$header = "Header Here";

//end - these should be changed


$body = "Sno: " . $_POST['Sno'] . "\n" . "Product: " . $_POST['Product'] . "\n" . "Manufacture: " . $_POST['Manufacture'] . "\n";
for($i=0;$i<count($_POST['Sno1'])){
    $body .= "Sno" . $i . ": " . $_POST['Sno1'][$i] . "\n";
}

for($i=0;$i<count($_POST['Product1'])){
    $body .= "Product" . $i . ": " . $_POST['Product1'][$i] . "\n";
}

for($i=0;$i<count($_POST['Manufacture1'])){
    $body .= "Manufacture" . $i . ": " . $_POST['Manufacture1'][$i] . "\n";
}
mail($to,$header,$body,"From: " . $from);
?>
  1. <?php
  2. //these should be changed
  3. $to = "mail@mail.com";
  4. $from = "mail@mail.com";
  5. $header = "Header Here";
  6. //end - these should be changed
  7. $body = "Sno: " . $_POST['Sno'] . "\n" . "Product: " . $_POST['Product'] . "\n" . "Manufacture: " . $_POST['Manufacture'] . "\n";
  8. for($i=0;$i<count($_POST['Sno1'])){
  9.     $body .= "Sno" . $i . ": " . $_POST['Sno1'][$i] . "\n";
  10. }
  11. for($i=0;$i<count($_POST['Product1'])){
  12.     $body .= "Product" . $i . ": " . $_POST['Product1'][$i] . "\n";
  13. }
  14. for($i=0;$i<count($_POST['Manufacture1'])){
  15.     $body .= "Manufacture" . $i . ": " . $_POST['Manufacture1'][$i] . "\n";
  16. }
  17. mail($to,$header,$body,"From: " . $from);
  18. ?>


That should just about do it ...
  • sheraz79
  • Newbie
  • Newbie
  • sheraz79
  • Posts: 6

Post 3+ Months Ago

Nothing really happen with your script, it is not picking up anything.

Post Information

  • Total Posts in this topic: 11 posts
  • Users browsing this forum: No registered users and 24 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.