Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 224
  • Last Modified:

Post + new Webpage

How can I have a forms submit button mail the data to the appropriate person and then jump to a new webpage?
0
BoB
Asked:
BoB
1 Solution
 
JagarCommented:
You could probably do it using MSMQ (Microsoft Messaging Queue), but I've never used this, so can't provide examples, buts its a pplace for you to start if no one can provide examples
0
 
bernfarrCommented:
You can probably do it by having an onsubmit javascript function. Be aware that some browsers specifically check for a form that sends mail and warns the user, so it may cause some angst for your users.
0
 
MasseyMCommented:
What you would need to do is create a CGI program that would take the input the user sent and then send a "redirection" header back.. This would redirect the page to another location..
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
sybeCommented:
Create 2 forms, one that is mailed, and one that is posted. You can make one of the forms completely hidden.

Then comparable to bernfarr's suggestion, make a submit button that calls a Javascript which will submit the 2 forms.

It will only work in javascript enabled browsers, but that's the majority of browsers.



0
 
BoBAuthor Commented:
Can I have an example javascript to do this?  I don't have cgi available to me on my server.
0
 
BoBAuthor Commented:
I'm looking for a little more than just "use a cgi program."  Could you please give me an example preferably in javascript.

BoB
0
 
sybeCommented:
<form name="mailform" action="mailto:who@where.com" ENCTYPE="text/plain">

</form>

<form action="newpage.htm">

<input type="submit" onClick="SendMail()">

</form>


<script>
function SendMail() {
  document.mailform.submit();
  return true;
}
</script>
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now