Solved

Post + new Webpage

Posted on 1998-08-14
7
202 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
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
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…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

735 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