submit a form from an email...

C

cynth-

Greetings!

I am successfully generating an HTML-formatted email using ASP and a
NewMail object. It works great. The content of the email includes a
simple HTML form that posts to an asp page.

THE PROBLEM:
The form in the email functions properly (can be submitted, opens a
browser and redirects to the "post-to" asp page) but the form data is
not making it. i.e.....

at the far end in the "post-to" asp page....
request.form("someField") is empty

I imagine it has to do with encryption but can't find any info on the
subject. Any thoughts are greatly appreciated.

Thank you kindly,
Cynthia-
 
R

Roland Hall

"cynth-"wrote:
Greetings!
Howdy!

THE PROBLEM:
The form in the email functions properly (can be submitted, opens a
browser and redirects to the "post-to" asp page) but the form data is
not making it. i.e.....

at the far end in the "post-to" asp page....
request.form("someField") is empty

I imagine it has to do with encryption but can't find any info on the
subject. Any thoughts are greatly appreciated.


If you have enctype= something then take it out. enctype="text/plain" would
be used if you're action is action=mailto:[email protected] Also, hopefully
you mean method="post" and not method="post-to".

This is all you need:
<form id="aspform" name="aspform"
action="http://mydomain.com/asp/myformresults.asp" method="post">

....unless you're validating input then you would change it to something
like:

<script type="text/javascript">
function validate() {
var iname=document.getElementById("yourname");
if(!iname.value) {
alert("Please type in your name");
iname.focus();
return false;
} else {
document.aspform.action="http://mydomain.com/asp/myformresults.asp";
document.aspform.submit();
return true;
}
}
</script>

<form id="aspform" name="aspform" method="post" onSubmit="return
validate()">
<input id="yourname" name="yourname" type="text" value="" />

--
Roland

This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top