经典 Asp 中的发票 +阿贾克斯
我需要一个发票表格,
请帮助我了解如何将所有数据一次插入发票表中。
我正在使用文本框来获取项目的所有详细信息。
这是从表中获取项目详细信息的代码。
enter code here<% While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))%>
<tr>
<td><input name="dipatchid" type="text" id="dipatchid" value="<%=(Recordset1.Fields.Item("dispatchid").Value)%>" size="5" /></td>
<td><input name="dispatchdate" type="text" id="dispatchdate" value="<%=(Recordset1.Fields.Item("dis_date").Value)%>" /></td>
<td><input type="hidden" name="custid_" id="custid_" />
<input name="From_" type="text" id="From_" value="<%=(Recordset1.Fields.Item("from_").Value)%>" /></td>
<td><input name="to_" type="text" id="to_" value="<%=(Recordset1.Fields.Item("To_").Value)%>" /></td>
<td><input name="hrs" type="text" id="hrs" value="<%=(Recordset1.Fields.Item("total_hrs").Value)%>" size="5" /></td>
<td><input name="rate_" type="text" id="rate_" size="8" /></td>
<td><input name="totalamt" type="text" id="totalamt" size="10" /></td>
<td><img src="imgs/error_icon.png" width="16" height="16" alt="Remove" /></td> </tr>
<% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 Recordset1.MoveNext() Wend %>
I need to a form for invoicing,
Please help me to have some Idea how to insert all the data at once into invoice table.
I am using text box to get all details for items .
here is the code for get details of items from table.
enter code here<% While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))%>
<tr>
<td><input name="dipatchid" type="text" id="dipatchid" value="<%=(Recordset1.Fields.Item("dispatchid").Value)%>" size="5" /></td>
<td><input name="dispatchdate" type="text" id="dispatchdate" value="<%=(Recordset1.Fields.Item("dis_date").Value)%>" /></td>
<td><input type="hidden" name="custid_" id="custid_" />
<input name="From_" type="text" id="From_" value="<%=(Recordset1.Fields.Item("from_").Value)%>" /></td>
<td><input name="to_" type="text" id="to_" value="<%=(Recordset1.Fields.Item("To_").Value)%>" /></td>
<td><input name="hrs" type="text" id="hrs" value="<%=(Recordset1.Fields.Item("total_hrs").Value)%>" size="5" /></td>
<td><input name="rate_" type="text" id="rate_" size="8" /></td>
<td><input name="totalamt" type="text" id="totalamt" size="10" /></td>
<td><img src="imgs/error_icon.png" width="16" height="16" alt="Remove" /></td> </tr>
<% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 Recordset1.MoveNext() Wend %>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为了实现这一点,您需要跟踪两件事:
做到这一点的技巧很简单。显示数据时,您可以使用循环数来递增变量。
在关闭
接下来,在您提交的页面上,循环
iNumberOfRecords
次以插入所有行。(i)
为您获取正确的Request.Form("...")
项目。To accomplish this, you will need to keep track of two things:
Tricks to do this, is simple. While you display your data, you increment a variable with the number of loops.
Before you close your
<form>
tag, you put that in a hidden field.Next, on the page where you submit to, you loop
iNumberOfRecords
times to insert all the rows.The
(i)
fetches the rightRequest.Form("...")
item for you.