Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Showing preview before form submission

Status
Not open for further replies.

carla

Technical User
Jan 9, 2001
39
US
Hello,

I am somewhat new to this so please bear with me if this seems a little simple. I have a form that a user can fill out to send notfications to a list of email addresses that are pulled from a customer database. I need to allow the user to preview what is being sent before it is actually sent.

What is the best way to do this? I think session variables will do the trick, but from what I have been reading, that might be taxing on my server. Could I have a hyperlink on the form page that the user can click which will bring up a pop up window with a preview? Any ideas?

Any help is appreciated!
Thanks in advance,
Carla

 
Well you could try something like this

formpage.asp:
<form action=&quot;preview.asp&quot; method=&quot;post&quot;>
<input type=&quot;text&quot; name=&quot;name&quot;>
<input type=&quot;text&quot; name=&quot;address&quot;>
<input type=&quot;submit&quot;>
</form>

preview.asp

<%
name = request.form(&quot;name&quot;)
address = request.form(&quot;address&quot;)
%>
<table>
<tr>
<td>
name:
</td>
<td>
<%=name%>
</td>
</tr>
<tr>
<td>
address:
</td>
<td>
<%=address%>
</td>
</tr>
</table>
<form action=&quot;send.asp?name=<%=name%>&address=<%=address%>&quot; method=&quot;post&quot;>
<input type=&quot;submit&quot;>
</form>

send.asp:

<%
name=request.querystring(&quot;name&quot;)
address=request.querystring(&quot;address&quot;)

...
...
%>

here in the third page you can send it through e-mail or send it to a DB.

hope this can help you,
Fred :)
 
Great tip, Fred!

Carla, you could also try using a bunch of hidden fields to store values that will be passed on to each subsequent page.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top