In this code, clicking on the button generates a new email w/ certain info already populating the field. What I want to do is make it so that when one of the selections from the drop-down list is selected, it will change the subject to the value of that option. So, clicking on Dropped Call will make an email that has Dropped Call as its subject.
<html>
<head>
<title>MAILTO</title>
<script type="text/javascript">
function email()
{
var subject = "This email is being sent using a function by variables"
var body = "This email was generated at ["+new Date()+"]";
location.replace("MAILTO:[email protected]="+subject+"&body="+body+";");
return true;
}
function email2(stuff)
{
alert(stuff)
}
</script>
</head>
<body bgcolor="#FFFFFF">
<form name="mainForm">
<input type="button" value=http://www.webdeveloper.com/forum/archive/index.php/"Dropped Call" onclick="email()">
<select onchange="email2()">
<option value="Dropped Call">Dropped Call
<option value="Misdirected">Misdirected
</select>
</form>
</body>
</html>
<html>
<head>
<title>MAILTO</title>
<script type="text/javascript">
function email()
{
var subject = "This email is being sent using a function by variables"
var body = "This email was generated at ["+new Date()+"]";
location.replace("MAILTO:[email protected]="+subject+"&body="+body+";");
return true;
}
function email2(stuff)
{
alert(stuff)
}
</script>
</head>
<body bgcolor="#FFFFFF">
<form name="mainForm">
<input type="button" value=http://www.webdeveloper.com/forum/archive/index.php/"Dropped Call" onclick="email()">
<select onchange="email2()">
<option value="Dropped Call">Dropped Call
<option value="Misdirected">Misdirected
</select>
</form>
</body>
</html>