Advertisement

09.09.2008 at 05:34PM PDT, ID: 23717699
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.2

HTML TO HTML

Asked by tracyms in Active Server Pages (ASP), Web Languages/Standards, JavaScript

I created the form that sends data to an fdf as outlined on this website:

 http://www.15seconds.com/issue/990902.htm

I would like to use this for an online form I'm putting together but I need to have one section of the form completed by the user, then once submitted, it will send a link in an email for the Admin to complete the rest of the form. At that point, the admin would submit the entire form and the fdf would be sent as an email attachment to main office.

I have it working now just by using the example in the link, I complete and submit the form, it saves as fdf file on the server, then sends the named file as an attachment. This is done using asp on IIS. I don't know how I can save the part the user fills out in the html form in order to have it sent to the admin to complete their portion. The user needs to do their part first.

As long as I can get all the form data into one html form, then I can utilize script above to send completed html form to server to process the rest (save as fdf and send as attachment). I'd also like to be able to save the fdf according to the LastName, FirstName, hhmmss to avoid any overwrites if users have same name (i.e. SmithJohn-02:30:04) convention instead of as one file name as shown in script (CheckThis.fdf). No databases will be used! I've attached the sample code I tested with thus far that works, thanks for any assistance!
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
---HTML FORM----
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<H1>Adobe FDF Example</H1>
<FORM NAME=W4Help ACTION=W4.asp METHOD = POST>
<TABLE>
	<TR>
		<TD ALIGN=RIGHT VALIGN=TOP>First Name</TD>
		<TD><INPUT TYPE=TEXT NAME=txtFirstName>
		</TD>
	</TR>
	<TR>
		<TD ALIGN=RIGHT VALIGN=TOP>Middle Initial
		</TD>
		<TD><INPUT TYPE=TEXT NAME=txtMI>
		</TD>
	</TR>
	<TR>
		<TD ALIGN=RIGHT VALIGN=TOP>LastName</TD>
		<TD><INPUT TYPE=TEXT NAME=txtLastName>
</TD>
	</TR>
		<TR>
		<TD ALIGN=RIGHT VALIGN=TOP>Social</TD>
		<TD><INPUT TYPE=TEXT NAME=txtSocial1 SIZE=3>-
<INPUT TYPE=TEXT NAME=txtSocial2 SIZE=2>-
<INPUT TYPE=TEXT NAME=txtSocial3 SIZE=2></TD>
	</TR>
	<TR>
		<TD ALIGN=RIGHT VALIGN=TOP>Street Address</TD>
		<TD><INPUT TYPE=TEXT NAME=txtStreetAddress></TD>
	</TR>
	<TR>
		<TD ALIGN=RIGHT VALIGN=TOP>City
		</TD>
		<TD><INPUT TYPE=TEXT NAME=txtCity></TD>
	</TR>
	<TR>
		<TD ALIGN=RIGHT VALIGN=TOP>State</TD>
		<TD><INPUT TYPE=TEXT NAME=txtState SIZE=2 MAXLENGTH=2></TD>
	</TR>
	<TR>
		<TD ALIGN=RIGHT VALIGN=TOP>Zip</TD>
		<TD><INPUT TYPE=TEXT NAME=txtZip SIZE=10></TD>
	</TR>
	<TR>
		<TD ALIGN=RIGHT VALIGN=TOP>Filing Status</TD>
		<TD>
		<INPUT TYPE=RADIO NAME=radFilingStatus VALUE="1">Single
		<BR>
		<INPUT TYPE=RADIO NAME=radFilingStatus VALUE="2">Married
		<BR>
		<INPUT TYPE=RADIO NAME=radFilingStatus VALUE="3">
		Married but withholding at the higher single rate.
		<BR></TD>
	</TR>
	<TR>
		<TD ALIGN=RIGHT VALIGN=TOP>Allowances Claimed</TD>
		<TD><INPUT TYPE=TEXT NAME=txtAllowances SIZE=2 MAXLENGTH=2>	</TD>
	</TR>
	<TR>
		<TD ALIGN=RIGHT VALIGN=TOP>Additional amount to withhold (if any)</TD>
		<TD><INPUT TYPE=TEXT NAME=txtAdditional SIZE=2 MAXLENGTH=2>
		</TD>
	</TR>
	<TR>
		<TD ALIGN=RIGHT VALIGN=TOP>I want to file Exempt from Withholding
		</TD>
		<TD><INPUT TYPE=CHECKBOX NAME=chkExempt></TD>
	</TR>
</TABLE>
<INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>
 
---ASP PAGE---
<%@ Language=VBScript %>
<% Response.Buffer = true%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<%
'
'	Retrieve the user responses
'
FirstName = Request.form("txtFirstName")
MI = Request.form("txtMI")
LastName = Request.form("txtLastName")
SS1 = Request.form("txtSocial1")
SS2 = Request.form("txtSocial2")
SS3 = Request.form("txtSocial3")
StreetAddress = Request.form("txtStreetAddress")
City = Request.form("txtCity")
State = Request.form("txtState")
Zip = Request.form("txtZip")
FilingStatus = Request.form("radFilingStatus")
Allowances = Request.form("txtAllowances")
Additional = Request.form("txtAdditional")
Exempt = Request.form("chkExempt")
If Exempt = "on" Then
	Exempt = "EXEMPT"
Else
	Exempt = ""
End If
'
'	Create an instance of the Object
'
Set FdfAcx = Server.CreateObject("FdfApp.FdfApp")
'
' 	Use the fdfApp to feed the vars
'
Set myFdf = FdfAcx.FDFCreate
'
'	Stuff the variables
'
myFdf.fdfsetvalue "FirstName", FirstName, false
myFdf.fdfsetvalue "MI", MI, false
myFdf.fdfsetvalue "LastName", LastName, false
myFdf.fdfsetvalue "SS1", SS1, false
myFdf.fdfsetvalue "SS2", SS2, false
myFdf.fdfsetvalue "SS3", SS3, false
myFdf.fdfsetvalue "StreetAddress", StreetAddress, false
myFdf.fdfsetvalue "City", City, false
myFdf.fdfsetvalue "State", State, false
myFdf.fdfsetvalue "Zip", Zip, false
If FilingStatus = 1 Then
	MyFdf.fdfsetValue "StatusSingle", "X", false
End If
If FilingStatus = 2 Then
	MyFdf.fdfsetValue "StatusMarried", "X", false
End If
If FilingStatus = 3 Then
	MyFdf.fdfsetValue "MarriedBut", "X", false
End If
myFdf.fdfsetvalue "Allowances", Allowances, false
myFdf.fdfsetvalue "Additional", Additional, false
myFdf.fdfsetvalue "Exempt", Exempt, false
'
'	Point to your pdf file
'
myFDF.fdfSetFile "http://www.servername.com/workorder/w4.pdf"
Response.ContentType = "text/html"
'
'	Save it to a file.  If you were going to save the actual file past the point of printing
'	You would want to create a naming convention (perhaps using social in the name)
'	Have to use the physical path so you may need to incorporate Server.mapPath in 
'	on this portion.
'
myFDf.FDFSaveToFile "C:\inetpub\wwwroot\workorder\CheckThis.fdf"
' Send attachment
%>
 <%
    Set MyCDONTSMail3 = CreateObject("CDONTS.NewMail")
    MyCDONTSMail3.From= "me@nowhere.com"
    MyCDONTSMail3.To= "MainOffice@nowhere.com"
    MyCDONTSMail3.Cc="Admin@nowhere.com"
    MyCDONTSMail3.Subject="This is a Test"
    
        MyCDONTSMail3.AttachFile 
"C:\inetpub\wwwroot\workorder\CheckThis.fdf"
  
    MyBody2 = MyBody2 & "Completed Form Attached"
    MyCDONTSMail3.Body= MyBody2
    MyCDONTSMail3.Send
    set MyCDONTSMail3=nothing
%>
<%
 
'	Close your Objects
'
myfdf.fdfclose
set fdfacx = nothing
%>
[+][-]09.11.2008 at 04:34PM PDT, ID: 22456035

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.11.2008 at 04:57PM PDT, ID: 22456125

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.11.2008 at 05:11PM PDT, ID: 22456195

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.17.2008 at 05:10PM PDT, ID: 22505290

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Active Server Pages (ASP), Web Languages/Standards, JavaScript
Sign Up Now!
Solution Provided By: tracyms
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628