This is the code I am trying to use to call the template as the user clicks to download the document. It obviously isn't right, but gives the idea of what I am attempting to do.
<a href="doc_directory/doc_file.pdf" onclick="doc_download_alert.cfm";>Click here to download document</a>
This is the code for the called template that is supposed to fire off the <CFMAIL> message in the background:
<!doctype html public "-//W3C//dtd html 3.2 Final//EN"> <html> <head> </head> <body> <cfprocessingdirective suppresswhitespace="no"> <cfmail type="html" from="my website" to="email@example.com" subject="download alert"> <p>ALERT: document downloaded from my page </cfmail> </cfprocessingdirective> </body> </html>
This post has been edited by Craig328: 05 October 2014 - 07:16 AM
Reason for edit:: Used the proper code tag for the post