Guest_imported
New member
- Jan 1, 1970
- 0
Hello... need some help with the following code... for some reason it's not inserting the ";" between each email address, but instead is inserting just a comma. In a nutshell, I'm passing email addresses from an employee listing (via users checking checkboxes) to the page coded below. I think I'm close, but obviously not quite there. THANKS for any ideas.
<%@LANGUAGE="VBSCRIPT"%>
<%
For i = 1 to Request.Form.Count
If Left(Request.Form.Key(i),3) ="chk" then strMailTo = strMailTo & Request.Form(i) & ";"
Next
If Right(strMailTo,1) = ";" then
strMailTo = Left(strMailTo,Len(strMailTo)-1)
End if
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language=JavaScript>
function email() {
window.open("mailto:<%= strMailTo%>"
}
</script>
</head>
<body bgcolor="#FFFFFF" onLoad="email();">
</body>
</html>
<%@LANGUAGE="VBSCRIPT"%>
<%
For i = 1 to Request.Form.Count
If Left(Request.Form.Key(i),3) ="chk" then strMailTo = strMailTo & Request.Form(i) & ";"
Next
If Right(strMailTo,1) = ";" then
strMailTo = Left(strMailTo,Len(strMailTo)-1)
End if
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language=JavaScript>
function email() {
window.open("mailto:<%= strMailTo%>"
}
</script>
</head>
<body bgcolor="#FFFFFF" onLoad="email();">
</body>
</html>