Entry
Can I use JS to 'submit' an HTML form MAILTO: wise
Feb 3rd, 2005 04:42
Stoyan Stefanov, Nick Hearn,
To submit this simple form:
<form name="automailto" action="mailto:you@example.org" method="post">
<input type="text" name="test" value="Some text here" />
</form>
... anywhere on the page you can use something like:
<a href="javascript:document.forms['automailto'].submit()">mail me that
form, pleese</a>
Of course in order for this to work, your site visitors have to have an
email client setup and they'll have to "say" OK to the prompt that
advises them that this form is being submitted by email. If you want to
workaround these restrictions you can use a server-side (PHP, ASP,
whatever) mailing script and submit the form to it.