I came up with the new problem. I want to fetch all form values by using request.form("FormName") which is generated by javascript on runtime.

The attached zip code contains the working code of javascript creating dynamic form elements. So after generating a couple of textboxes when I click on the "Submit" button it should display all the values entered in the textboxes on the next page.

Herez a working example of that javascript: http://www.quirksmode.org/dom/domform.html

Is this Possible?


If you are saying you would rather return the results to an asp page than use the CGI, you can comment out the:

<!--<form method="post" action="/cgi-in/show_params.cgi">-->

towards the end of index.html and insert

<form method="post" action="myNewAspPageName.asp">

Immediately after this line:

<div id="readroot" style="display: none">

Your form will now submit to your new asp page instead of to the CGI.

The next trick is reading the form items when you do not know how many are going to be sent.

Your asp page can determine this for you with:

'--returns all fields (names and values) submitted by the form
strFormInfo = Request.Form
response.write strFormInfo & "<BR>"

Which will return an ampersand (&) delimitted string that looks something like this:

From here, you can parse the string as you see fit.

Disclaimer: I do not know the limits of "Request.Form" and how it may be affected by the user's ability to eternally add fields.

You can use this code
dim i
For Each i in request.form("FormName")
Response.Write(i & "<br />")
where using i variable u can find the name of cantrol and its value.