You are here: irt.org | FAQ | JavaScript | Email | Q1756 [ previous next ]
Just a working example how to send form e-mail with Microsoft Outlook Express (and Outlook) without starting these programs (although they will receive a warning message!):
<html>
<head>
<body>
<script language="javascript">
functionupdate() {
alert("sorry not supported");
return false;
}
</script>
<script language="javascript1.2"><!--
function update() {
document.emailForm.action = 'mailto:' + document.hiddenForm.emailAddress.value +
'?SUBJECT=' + document.hiddenForm.subjectLine.value;
document.emailForm.elements[' '].value += '\n\n';
document.emailForm.submit();
return false;
}
//--></script>
<form name="hiddenForm" onSubmit="return false">
Email Address: <input type="text" name="emailAddress" value="someone@nospam.com">
<input type="hidden" name="subjectLine" value="subject description ">
</form>
<form name="emailForm" method="post" enctype="text/plain">
<textarea name=" ">
blah blah blah :-) enter here some text
some text
you can even make more form elements if you want
</textarea>
<input type="submit" onClick="return update()">
</form>
</body>
</html>Submitted by M. Posseth