Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

checkboxes and mailto

Status
Not open for further replies.

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=&quot;VBSCRIPT&quot;%>
<%
For i = 1 to Request.Form.Count
If Left(Request.Form.Key(i),3) =&quot;chk&quot; then strMailTo = strMailTo & Request.Form(i) & &quot;;&quot;
Next
If Right(strMailTo,1) = &quot;;&quot; then
strMailTo = Left(strMailTo,Len(strMailTo)-1)
End if
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
<script language=JavaScript>
function email() {
window.open(&quot;mailto:<%= strMailTo%>&quot;)
}
</script>

</head>

<body bgcolor=&quot;#FFFFFF&quot; onLoad=&quot;email();&quot;>

</body>
</html>
 
When you are pulling the checkbox values, are all of your checkboxes named the same NAME, if that is the case, you will be returned a string with all the values with commas in between each e-mail address.

Just something to look at.
Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top