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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

javascript mailto: subject ??

Status
Not open for further replies.

5656

Technical User
Jan 6, 2001
68
US
I'm creating a form...on this form I need a text field that will allow the user to input certain information that will "write" to the subject field of the e-mail.
This way, the subject of the e-mail will be dynamic and the user of the form can customize the subject to their identity...

Is it possible to do this using javascript ? If so, could you please provide the script.

Thank you in advance...
 
Here's a start, I'm not sure how familiar with JavaScript you are or if this is even what you are looking for:

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!--Begin

// These variables can come from a form
var vEmail = &quot;sendto@email.com&quot;
var vSubject = &quot;This is the email subject&quot;;
var vBody = &quot;This is the body of the email&quot;;

// Open my email and add all these variables to it
document.location = &quot;mailto:&quot; + vEmail + &quot;?subject=&quot;+vSubject+&quot;&amp;body=&quot; + vBody;


//End-->
</SCRIPT>
 
not very familiar with javascript...so will this allow the user to input a unique subject to each e-mail ? That's what I'm looking for.
thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top