I hava a form, which has five lines to enter at start. I want to have a button to add more lines when it is clicked. However, I am having trouble with it. This is written in vbscipt and ADO.
Expand|Select|Wrap|Line Numbers
- Code: ( text )
- <%
- Const linesNo = 5
- Dim counter
- <html>
- .....
- <form action='return_form.asp' method=post>
- <input type=hidden name='task' value='add'>
- <table>
- .....
- <%
- if request("task")="lines" then
- linesNo = linesNo + 5
- response.write "return_forms.asp"
- end if
- counter = 0
- Do While counter < linesNo
- %>
- <tr>
- <td width=20%><input type=text size="20" maxlength="30" name='part_no_<%=counter%>' value='<%=request("part_no_")%>'/></td>
- </tr>
- <%
- counter = counter + 1
- Loop
- %>
- <tr>
- <td width=20%><form action='return_form.asp' method=post><input type=hidden name='task' value='lines'></form>
- <input type=submit name='lines' value='Add Lines'></td>
- </tr>
- ......................(some codes)
- <tr>
- <td></td> <td><input type=submit value="Save & Print"></td>
- </tr>
- </table>
- </form>