Forums

ASP

This topic is locked

Redirect after Form Submit

Posted 23 Aug 2005 15:26:47
1
has voted
23 Aug 2005 15:26:47 andy bertaut posted:
I have a couple of forms on a site, and had added a Go To URL behaviour to each submit button in order to go to a confirmation page after sending. The trouble is if i leave this behaviour attached it stops the form data from being sent. I have a mailto: in the form action to go to my address, and a Validate Form behaviour also attached to the Submit. I have tried to get the Go To URL to work with and without this Validate Form behaviour, but it stops the data being transmitted whatever i do. Does anyone know another easy way to redirect to a confirmation page after the form has been submitted? Right now users are left looking at the same page with all of the details they entered into the field still intact, and have no way to know if the form sent or not. I am including the relevant code below, the page is www.wizard.ie/asp/mail_list.asp
Thanks
<form action="mailto: ?subject=Mailing_List" method="post" enctype="text/plain" name="MailList" id="MailList" onSubmit="MM_validateForm('name','','R','business','','R','phone','','RisNum','email','','RisEmail','address','','R');return document.MM_returnValue">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2"><div align="justify">If you would like to be added to or removed from our Mailing
List, then please provide us with a few details below: </div></td>
</tr>
<tr>
<td width="53%"> </td>
<td width="47%"> </td>
</tr>
<tr>
<td><div align="left">Name:</div></td>
<td>
<div align="left">
<input name="name" type="text" id="name" onBlur="MM_validateForm('name','','R');return document.MM_returnValue">
</div></td>
</tr>
<tr>
<td><div align="left">Address:</div></td>
<td>
<div align="left">
<textarea name="address" id="address" onBlur="MM_validateForm('address','','R');return document.MM_returnValue"></textarea>
</div></td>
</tr>
<tr>
<td><div align="left">Business:</div></td>
<td>
<div align="left">
<input name="business" type="text" id="business" onBlur="MM_validateForm('business','','R');return document.MM_returnValue">
</div></td>
</tr>
<tr>
<td><div align="left">Phone:</div></td>
<td>
<div align="left">
<input name="phone" type="text" id="phone" onBlur="MM_validateForm('phone','','RisNum');return document.MM_returnValue">
</div></td>
</tr>
<tr>
<td><div align="left">Email:</div></td>
<td>
<div align="left">
<input name="email" type="text" id="email" onBlur="MM_validateForm('email','','RisEmail');return document.MM_returnValue">
</div></td>
</tr>
<tr>
<td><div align="left"></div></td>
<td><div align="left"></div></td>
</tr>
<tr>
<td><div align="left">I wish to be Included in your Mailing List: </div></td>
<td><p align="left">
<label>
<input type="radio" name="Mailgroup" value="Yes, add me to your Mailing List">
Yes</label>
<br>
<label>
<input type="radio" name="Mailgroup" value="No, Remove me from your Mailing List">
No</label>
<br>
</p></td>
</tr>
<tr>
<td height="24"><div align="left"></div></td>
<td height-"25"><div align="left"></div></td>
</tr>
<tr>
<td><div align="left"></div></td>
<td>
<div align="left">
<input type="submit" name="Submit" value="Send">
</div></td></tr>
<tr>
<td><div align="left"></div></td>
<td><div align="left">
<input type="reset" name="Submit2" value="Clear Form">
</div></td>
</tr>
<tr>
<td><div align="left"></div></td>
<td> </td>
</tr>
</table>
</form>

Replies

Replied 25 Aug 2005 00:11:56
25 Aug 2005 00:11:56 Rene Bandsma replied:
A better way is to create a ASP page that reads out all the form data and you have to put that page in the ACTION method of the FORM tag. In the 'mailsend' page you can create everything and when the mail is send you can create a follow up page with Response.Redirect("URL" or make the 'mailsend' page also the follow up page

<hr><b>DMXZone support manager</b><br><a href="www.kousman.nl">Kousman web resellers</a>
Replied 26 Aug 2005 16:48:11
26 Aug 2005 16:48:11 andy bertaut replied:
thanks...will try it out

Reply to this topic