| | |
Fetching Form Values with ASP
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Hey!
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?
Thanx
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?
Thanx
If you are saying you would rather return the results to an asp page than use the CGI, you can comment out the:
towards the end of index.html and insert
Immediately after this line:
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:
Which will return an ampersand (&) delimitted string that looks something like this:
rankingsel=Rating&rankingsew=Rating&cd=title&rankingsel2=Rating&rankingsew2=Rating&cd2=title
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.
ASP Syntax (Toggle Plain Text)
<!--<form method="post" action="/cgi-in/show_params.cgi">-->
ASP Syntax (Toggle Plain Text)
<form method="post" action="myNewAspPageName.asp">
ASP Syntax (Toggle Plain Text)
<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:
ASP Syntax (Toggle Plain Text)
'--returns all fields (names and values) submitted by the form strFormInfo = Request.Form response.write strFormInfo & "<BR>"
rankingsel=Rating&rankingsew=Rating&cd=title&rankingsel2=Rating&rankingsew2=Rating&cd2=title
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.
Delete * Where FlatFile=True
![]() |
Similar Threads
- Save the values of a form (HTML and CSS)
- Passing Form Values Problem (ASP)
- HTML newbie problem!! (JavaScript / DHTML / AJAX)
- asp connecting to database (ASP)
- Help with asp form will not display contact information (ASP)
- Retrieving values from pop up and displaying into asp page (ASP)
Other Threads in the ASP Forum
- Previous Thread: retrive data from different tables of Ms access
- Next Thread: ASP .NET C# SQL on Visual Studio 2003, help?
| Thread Tools | Search this Thread |
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection connection database databaseconnection dreamweaver excel fso iis msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile record searchbox selectoption single specfic sqlserver sqlserverconnection windows7





