Hello everyone.
What I am trying to do is have the ability to send email (or worst case senerio) open the default mail client and send an email.
Here is what I have so far.
I have 2 textboxes and a textarea, and a submit button. However, I am trying to capture the name subject and body to send. I can get it to open in a mail client but I can't get the text I want to appear (which will vary). So for instance the email, subject I can't get to appear. For some reason the variable name is appearing. Below is my code. Any help would be great.
<html>
<head>
<script type="text/javascript">
function sayHi()
{
var txtName = document.getElementById(email);
var txtOutput = document.getElementById("Subject").value;
}
</script>
</head>
<body>
<input type="text" id="email"> <br />
<input type="subject"> <br />
<textarea rows="5" cols="20" id="Box"> </textarea><br />
<a href="mailto:txtName?subject=txtOutput&body='Box'">Send Email</a>
<input type="button" value="Send email" onClick="sayHi()"><br />
</body>
</html>
Thank you,
Thank you, but I need a little more help. What do I do on either my link or my button?
<input type="email" id="email"> <br />
<input type="subject" id="subject"> <br />
<textarea rows="5" cols="20" id="Box"> </textarea><br />
<a href="mailto:email?subject=subject&body="stuff"">Send Email</a>
<input type="button" value="Send email" onClick="sayHi()"><br />
What I am trying to do is have the ability to send email (or worst case senerio) open the default mail client and send an email.
Here is what I have so far.
I have 2 textboxes and a textarea, and a submit button. However, I am trying to capture the name subject and body to send. I can get it to open in a mail client but I can't get the text I want to appear (which will vary). So for instance the email, subject I can't get to appear. For some reason the variable name is appearing. Below is my code. Any help would be great.
<html>
<head>
<script type="text/javascript">
function sayHi()
{
var txtName = document.getElementById(email);
var txtOutput = document.getElementById("Subject").value;
}
</script>
</head>
<body>
<input type="text" id="email"> <br />
<input type="subject"> <br />
<textarea rows="5" cols="20" id="Box"> </textarea><br />
<a href="mailto:txtName?subject=txtOutput&body='Box'">Send Email</a>
<input type="button" value="Send email" onClick="sayHi()"><br />
</body>
</html>
Thank you,
Thank you, but I need a little more help. What do I do on either my link or my button?
<input type="email" id="email"> <br />
<input type="subject" id="subject"> <br />
<textarea rows="5" cols="20" id="Box"> </textarea><br />
<a href="mailto:email?subject=subject&body="stuff"">Send Email</a>
<input type="button" value="Send email" onClick="sayHi()"><br />