View Full Version : Form to write an email to specified input

08-12-2005, 03:33 AM
I hope this makes sense, but I need something that sounds very simple, but for some reason I can't easily figure out.

I want a form with a text input field and a button.
The site visitor types in a friend's email address, and clicks the button.
Their email client opens up a new email message email window, with the friend's email address already filled in, along with the subject and message.
All the visitor has to do now is click the send button.

I'm really not sure if javascript is even required for this task, but either way, I can't figure out how to make it work.

08-12-2005, 12:08 PM
Why don't you use form action="mailto:...." ?

For example,

<form action="mailto:mylinkdirectory@gmail.com?subject=Form Submission" method="post" enctype="text/plain">
<table width="676"><tr><td width="670" align="center">
Category: <INPUT NAME="Category" TYPE="text" SIZE=20><BR>
Site Title: <INPUT NAME="Site Title" TYPE="text" SIZE=20><BR>
URL: <INPUT NAME="URL" TYPE="text" VALUE="http://" SIZE=20><BR>
E-Mail: <INPUT NAME="E-Mail" TYPE="text" SIZE=20><BR>
Site Description: <INPUT NAME="Site Description" TYPE="text" SIZE=20><BR>
Reciprocal Link:&nbsp;&nbsp;
Yes: <INPUT NAME="Yes" TYPE="checkbox" value="ON">&nbsp;&nbsp;
No: <INPUT NAME="No" TYPE="checkbox" value="ON"><BR>
Reciprocal Link Page: <INPUT NAME="Reciprocal Link Page" TYPE="text" VALUE="http://" SIZE=20><BR>

<tr><td align=center width="670">
<INPUT TYPE="submit" value="Add Site" style="color: #ffffff; background-color: #000000">

That's it. I think it's better to skip JavaScript for this task.

Johnny Lang
08-12-2005, 01:44 PM
Code deleted. The constant harrassment here isn't worth my time.

08-16-2005, 01:29 AM
Got it. Thanks Johnny Lang.