Solved

Post + new Webpage

Posted on 1998-08-14
7
191 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

785 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