|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi All.
I am having a little trouble with a form that I have setup using ASP. The form posts to itself (lease_app_test.asp) using CDONTS then redirects to another page (credit_auth_test.asp). Like a Thank You page. On this other page, I would like to display (Embed in the HTML) 2 of the fields that were filled out from the previous page. Here is the code that I use to collect the data and email it: <% strMessage = "" If Request.Form("Action") = "Submit Application" then 'Initialize the CDONTS dll Set objMail = CreateObject("CDONTS.Newmail") With objMail .To = "EmailAddress" '.From = Request.Form("emailfrom") .From = "EmailAddress" .Subject = "Lease Application" Set DictResult = Server.CreateObject("Scripting.Dictionary") 'Add the contents of the Submitted Form items to a dictionary object For Each x In Request.Form DictResult.Add x, Request.Form(x) Next strRedirectURL = Request.Form("redirecturl") 'Remove the unecessary items from the dict object once they have served their purpose strRemove = Request.Form("remove") ary = Split(strRemove, ",") 'Remove all the elements specified in the form input "remove" from the dictionary object For i = 0 to UBound(ary) DictResult.Remove(ary(i)) Next 'Create an array of the dict object keys for name = value display arDictKey = DictResult.keys 'Loop through the dict object and set the email body to the result For cCount = 0 to DictResult.Count -1 strBody = strBody & arDictKey(cCount) & " = " & DictResult.Item(arDictKey(cCount)) & vbCrLf Next .Body = strBody .Send End With Set objMail = Nothing 'strMessage = "<div align=center>Application submitted, thank you!</div>" response.redirect strRedirectURL End If %> Here is the FORM tag that I am using: <form onSubmit="return checkrequired(this)" ACTION="lease_app_test.asp" ENCTYPE="x-www-form-encoded" METHOD="POST"> <input type="hidden" name="redirecturl" value="credit_auth_test.asp"> <input type="hidden" name="remove" value="redirecturl,Action,remove"> Here are the 2 fields that I want to collect and display on the other page: <input type="text" Name="requiredcompany_name" size="46"> <input type="text" Name="requiredcompany_address" size="46"> The credit_auth_test.asp page is just a plain html page with an asp extension. How do I get those 2 fields of information on to this page? Any help in this matter would be greatly appreciated. Thanks -LBeans Last edited by LBeans : October 13th, 2003 at 06:07 PM. |
|
#2
|
|||
|
|||
|
Figured it out.
Hey All.
I figured it out myself! Thanks for looking at this question all of you that did! Take Care! -LBeans |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Displaying Selected Form Data |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|