Click to See Complete Forum and Search --> : Mailer - format


TWE
08-02-2005, 06:25 PM
When mailing to one person, the format looks good. Each entry is on a seperate line. When mailing to 2 or more people, the first 2 entries follow the mailto list of people. How can I fix this?

CODE:

<script>
function submitonce(theform){
document.mailer.action += mailtoandsubject
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
setTimeout('alert("Your Email has been sent! Please DO NOT resend! Refresh your screen to send another entry. Check your sent items to assure your

information is correct. ")',2000)
}
}
</script>






<STYLE>BODY {
SCROLLBAR-FACE-COLOR: #000066; SCROLLBAR-ARROW-COLOR: brown; SCROLLBAR-TRACK-COLOR: #eeeeee
}
</STYLE>
</HEAD>
<BODY background= "http://test/test/Bkg_wrld.gif" text=#000000 vLink=#000066 aLink=#66cccc link=#000066 bgColor=#FFFFFF >
<CENTER mstheme>
<TITLE></title>
<table width="100%" cellpadding="3" cellspacing="0" border="0" bgcolor="#ffffff">
<tr div align="center">
<!-- Center Column -->
<td width="100%">
<p><img src="http://test/test/testjpg"></p>

<center>Escalation will be if the switch is not installed within 48 hours. <br>Jay Riccitelli EXT 77305 </center>
<!-- This form is for Circuit Request -->
<form NAME="mailer" METHOD="post" ACTION ENCTYPE="text/plain"
onSubmit="submitonce(this)">
<table BORDER="0" width="540">
<tr HALIGN="center">
<td width="4"></td>
<td><font size="3" face="Arial" color="#152878">Email To:</font></td>
<td>
<select NAME="mailtoperson" onChange="msg(this.form)" size="1">
<option value="test1@test.com; test2@test.com">Email
to All</option>
</select></td>
<td></td>
</tr>
<tr VALIGN="top">
<td></td>
<td><font size="3" face="Arial" color="#152878">Date of Pre-Site:</font></td>
<td>
<input TYPE="text" SIZE="45" NAME="Pre-Site Date" onChange="msg(this.form)">
</td>
<tr VALIGN="top">
<td></td>
<td><font size="3" face="Arial" color="#152878">New or Existing Circuit?:</font></td>
<td><select NAME="New or Existing Circuit?" onChange="msg(this.form)" size="1">
<option value="Tech Did not Choose New or Existing!">--Pick-One--</option>
<option value="New">New </option>
<option value="Existing">Existing</option>
</select></td>
<td></td>
</tr>
<tr VALIGN="top">
</tr>
<td></td>
<td><font size="3" face="Arial" color="#152878">Existing Circuit#:</font></td>
<td>
<input TYPE="text" SIZE="45" NAME="Circuit#" onChange="msg(this.form)">
</td>
</tr>
<tr VALIGN="top">
<td></td>
<td><font size="3" face="Arial" color="#152878">Network?:</font></td>
<td><select NAME="Network" onChange="msg(this.form)" size="1">
<option value="Tech Did not Choose a Network!">--Pick-One--</option>
<option value="N1">N1 </option>

</select></td>
<td></td>
</tr>
<tr VALIGN="top">
<td></td>
<td><font size="3" face="Arial" color="#152878">Location of Asset:</font></td>
<td>
<input TYPE="text" SIZE="45" NAME="Location" onChange="msg(this.form)">
</td>
</tr>
<tr VALIGN="top">
<td></td>
<td><font size="3" face="Arial" color="#152878">Asset#:</font></td>
<td>
<input TYPE="text" SIZE="45" NAME="Asset#" onChange="msg(this.form)">
</td>
</tr>
<tr VALIGN="top">
<td></td>
<td><font size="3" face="Arial" color="#152878">User:</font></td>
<td>
<input TYPE="text" SIZE="45" NAME="User" onChange="msg(this.form)">
</td>
</tr>
<tr VALIGN="top">
<tr VALIGN="top">
<td></td>
<td><font size="3" face="Arial" color="#152878">DCT Reference #:</font></td>
<td>
<input TYPE="text" SIZE="45" NAME="Reference" onChange="msg(this.form)">
</td>
</tr>
<tr VALIGN="top">
<td></td>
<td valign="top"><font size="3" face="Arial" color="#152878">Comments:</font></td>
<td>
<textarea NAME="Comment" COLS="45" ROWS="5" WRAP="virtual" OnChange="msg(this.form)"></textarea>
</td>
</tr>
<tr>
<td></td>
<td></td>
<td>
<input TYPE="submit" VALUE="Send">
<input TYPE="reset" VALUE="reset">
<script
LANGUAGE="JavaScript">
function msg() {
document.mailer.action = "mailto:"
mailtoandsubject = ((document.mailer.mailtoperson.options[document.mailer.mailtoperson.selectedIndex].value) + '?subject=Circuit Request - ' +

document.mailer.Reference.value);
}
</script>
</td>
</tr>
<tr>
<td height="3"></td>
<td></td>
<td></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</center></body>
</html>


OUTPUT:

mailtoperson=test@test.com; test2@test.com Pre-Site Date=08/02/2005 New or Existing Circuit?=Existing
Circuit#=200/G/C1/23
Network=N1
Location=200/G/C6
Asset#=1234567
User=Test, Johnny
Reference=22778.0862
Comment=Test from the Circuit Request mailer


DESIRED OUTPUT:

mailtoperson=test@test.com; test2@test.com
Pre-Site Date=08/02/2005
New or Existing Circuit?=Existing
Circuit#=200/G/C1/23
Network=N1
Location=200/G/C6
Asset#=1234567
User=Test, Johnny
Reference=22778.0862
Comment=Test from the Circuit Request mailer