I want to build an email subject containing text and a form field.
Have have got so far but all I seem to be able to do is generate another
page in the browser with a text string. (code attached)
I think that some how I need to pass the generated string as the action but
can't figure how to do it.
Can someone please tell me where I am going wrong and maybe suggest a
solution.
TIA
Steve
--
<HTML>
<TITLE> test</TITLE>
<HEAD>
<script language = "javascript">
function mailsubject(msubject){
var mailto = " \"mailto:wright\@wcc.govt.nz\"?Subject= ";
var subbase = "\"RAMM Record Carriageway Resurfacing Record" + "\"";
var contractno = document.resurfacingrecord.contract.value;
var method = " Method=" + "\"POST\"" + " enctype=" +"\"text" + "\/"
+"plain\"";
msub = mailto + subbase + "\"" + contractno + "\"" + method;
window.status = (msub);
return (msub);
}
</script>
</HEAD>
<body>
<form name = "resurfacingrecord" action= 'javascript:mailsubject();' >
<select name="contract">
<option value="">Select Contract</option>
<option value="RS-330">RS-330 Northern</option>
<option value="RS-331">RS-331 Southern</option>
</select>
<input type=submit value="Send Record">
</form>
</HTML>
--