Solved

Post + new Webpage

Posted on 1998-08-14
7
181 Views
Last Modified: 2013-12-25
How can I have a forms submit button mail the data to the appropriate person and then jump to a new webpage?
0
Comment
Question by:BoB
7 Comments
 
LVL 2

Expert Comment

by:Jagar
ID: 1859013
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
 
LVL 2

Expert Comment

by:bernfarr
ID: 1859014
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
 
LVL 10

Expert Comment

by:MasseyM
ID: 1859015
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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 28

Expert Comment

by:sybe
ID: 1859016
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
 

Author Comment

by:BoB
ID: 1859017
Can I have an example javascript to do this?  I don't have cgi available to me on my server.
0
 

Author Comment

by:BoB
ID: 1859018
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
 
LVL 28

Accepted Solution

by:
sybe earned 50 total points
ID: 1859019
<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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Read about why website design really matters in today's demanding market.
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now