You are here: irt.org | FAQ | JavaScript | Email | Q325 [ previous next ]
"Automatically" - in Client Side JavaScript - no, not without user intervention. It would a security breach if it were possible as you would be able to capture peoples email addresses without them knowing.
The nearest thing you can get to it is with Netscape:
<FORM ACTION="mailto:someone@somewhere.com" METHOD="POST" ENCTYPE="text/plain" NAME="myForm"> <INPUT TYPE="SUBMIT" NAME="mySubmitButton"> </FORM> <SCRIPT LANGUAGE="JavaScript"><!-- document.myForm.mySubmitButton.click(); //--></SCRIPT>
However, if the user has their browser setup to warn them when a form is being emailed over the net (which everyone should have done) then it will prompt the user before sending the email.