Solved

Add button to cfmail

Posted on 2006-10-19
3
339 Views
Last Modified: 2013-12-24
Hi, I have an html table in cfmail but wanted to know if there is any way to add a button so that when the email gets sent, my users can click on the button and it would copy the table, then paste that table in an excel spreadsheet.  Can cfm or javascript do this or would it depend on the user's email client to allow for that?
0
Comment
Question by:COwebmaster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 36

Expert Comment

by:SidFishes
ID: 17769937
pretty sure that kind of active content in an email would be prevented by most eClients. The interactive between the desktop on the email required would be  risky to allow.

(of course you could always get all of your user to switch to outlook express circa 1991. I'm sure this would be easy using that :)

0
 
LVL 3

Accepted Solution

by:
bhinshawnc1 earned 500 total points
ID: 17770931
Have a similar scenario where we email a form via outlook and when they click on the button in the email it sends info from the email form back to the server.

I would send them the button via email and when they click on, have it connect to your server, get the table and send those results out to an excel sheet.

Sample message to them:

<CFMAIL
spoolenable="no"
TO="#a#"
FROM="#b#"
SUBJECT="x"
TYPE="HTML">
<FORM NAME="email_form" ACTION="http://#your_server#/get_table.cfm" METHOD="post" onSubmit="return submitForm();">
 
<!--- use hidden fields to pass things back to the server --->
  <input type="hidden" name="sales_contact" value="#qry_project.a#">
  <input type="hidden" name="project_id" value="#qry_project.b#">
  <input type="hidden" name="pri_eng" value="#qry_project.c#">
  <table>
 
  <tr>
  <td colspan="2" align="center">
  <input type="hidden" name="submitform" value="">
 <input type="submit" name="Submit" value="submit" onClick="document.email_form.submitform.value = 'submit';">
  </td>
  </tr>
 
</table>

</FORM>

Then when they come to the page they get a message letting them know they will soon get a prompt for open or saving an excel file, they should save the file

then in that page use

<cfcontent type="application/msexcel">
         <cfheader name="Content-Disposition" value="filename=get_table.xls">

and whatever you have in a <cfoutput> after that would be sent to excel


</CFMAIL>
0
 

Author Comment

by:COwebmaster
ID: 17771277
Thanks, I'll try it out.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question