Solved

Add button to cfmail

Posted on 2006-10-19
3
351 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

696 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