ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 13th, 2003, 06:04 PM
LBeans LBeans is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: Colorado
Posts: 47 LBeans User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 43 sec
Reputation Power: 6
Question Displaying Selected Form Data

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.

Reply With Quote
  #2  
Old October 13th, 2003, 11:40 PM
LBeans LBeans is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: Colorado
Posts: 47 LBeans User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 43 sec
Reputation Power: 6
Figured it out.

Hey All.

I figured it out myself!

Thanks for looking at this question all of you that did!

Take Care!

-LBeans

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Displaying Selected Form Data


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT