borzoid
09-13-2003, 02:51 PM
Greetings,
I am trying to develop a form to email to customers asking for details for the work they want done which they could then send back to me. I do understand some of the basics of javascript and have used codes from off of the internet but this is beyond me. I have tried the "mailto" instructions given in other posts here and only get a blank email without any data at all.
I did find a nice simple script that does the trick but it defines the content in one field (body) and I have several fields. I would like the reply to include any fields that have been selected (checkboxes) or have had data entered but for the sake of simplicity do not care if blank fields are included as it is a small form. I know that this would have something to do with defining the variables in the script but there my knowledge ends. Here is the script. I greatly appreciate any help given.
Connie
<head>
<script>
function doIt()
{
var S=document.exf2.subject.value;
var B=document.exf2.body.value;
self.location="mailto:someone@somewhere.com?subject="+S+"&body="+B;
}
</script>
</head>
<body>
<form name=exf2>
<input type=hidden name=subject value="Subject"><BR>
<input type=text name=body value="Body"><BR>
<input type=button value="SUBMIT" onclick="doIt()">
</form>
</body>
I am trying to develop a form to email to customers asking for details for the work they want done which they could then send back to me. I do understand some of the basics of javascript and have used codes from off of the internet but this is beyond me. I have tried the "mailto" instructions given in other posts here and only get a blank email without any data at all.
I did find a nice simple script that does the trick but it defines the content in one field (body) and I have several fields. I would like the reply to include any fields that have been selected (checkboxes) or have had data entered but for the sake of simplicity do not care if blank fields are included as it is a small form. I know that this would have something to do with defining the variables in the script but there my knowledge ends. Here is the script. I greatly appreciate any help given.
Connie
<head>
<script>
function doIt()
{
var S=document.exf2.subject.value;
var B=document.exf2.body.value;
self.location="mailto:someone@somewhere.com?subject="+S+"&body="+B;
}
</script>
</head>
<body>
<form name=exf2>
<input type=hidden name=subject value="Subject"><BR>
<input type=text name=body value="Body"><BR>
<input type=button value="SUBMIT" onclick="doIt()">
</form>
</body>