Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send confirmation page by E-mail

Status
Not open for further replies.

SylviaD

Technical User
Apr 6, 2006
7
GB
We use on-line (intranet) forms for collecting various bits of information. When submitted a Confirmation Page is printed using onload="window.print() method.

We would like to be able to email this page instead of printing it. I know it can be done by using File Menu > Sned > Page by E-mail but is there a way I can automate this in a similar way to the Print method mentioned above?

We use Microsoft FontPage to create the pages but we do not have Share point Services installed at present.

Many thanks.
 
make your form action a mailto:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]

<html>
<head>
<title>Untitled</title>
<script type="text/javascript"><!--

function doMail() {
    var f = document.forms['f'];
    f.action += "?subject=information&body=" + f.elements['t'].value;
    f.submit();
}

//--></script>
</head>

<body>

<form name="f" action="mailto:me@you.com" method="post">
<input type="text" name="t" />
<input type="button" onclick="doMail();" value="Send" />
</form>

</body>
</html>



*cLFlaVA
----------------------------
[tt]somebody set up us the bomb![bomb][/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
If you need to do some processing before sending, you might have to go to a php script as the action and send the email from there.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top