I have an email address list that is dynamically genereated from an SQL Database. I want to write the address into a MAILTO: image using javascript, but can't figure out how to incorporate my ASP into the code.
I am using the JS here http://javascript.internet.com/page-...ermeasure.html
Here is my code but it doesn't work:
Code:'receive value from DB <%= oRs.Fields("email") %> '========================= <script language="JavaScript"><!-- // hide script <% Dim email as String email= oRs.Fields("email") if(email.IndexOf("@")>0){ %> var sb_domain = "<%=email.Substring(email.IndexOf("@") + 1)%>"; var sb_user = "<%=email.Substring(0, (email.IndexOf("@") + 1))%>"; var sb_recipient = sb_user + sb_domain; var sb_url = "mailto:" + sb_recipient; document.write('<a href="'+sb_url+'"><img src="http://somesite.com/email1.jpg" border="0"/> </a>'); <%}%> // --></script>
can someone help me write this, I getting loads of Microsoft VBScript errors. OR does anyone have a script that already functions?
Thanks!!!!



Reply With Quote


Bookmarks