Click here to Skip to main content
15,892,253 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I have a web page with few buttons.

1. First thing i need to do is, on the click of the save button, clients screen need to saved as pdf and a auto download option has to be given to client, so that client can save the pdf file.

2. Next, on click of mail button client should be able to mail that pdf file. The mailing can be done in any way as mentioned below,
a. Automatically open the outlook with the pdf attachment.
b. Accept the recipients from the user and send mail directly to all of them with the pdf attachment.


Anyone having any idea related to this, Please help. It will be very useful for me.
Aleast any your inputs, how this can be achieved.


Current scenario,

I am having three buttons

XML
<span>
           <input type="button" id="btnSave" value="Save" style="width: 75px; height: 21px" />
       </span>
       <span>
           <input type="button" id="btnPrint" value="Print" style="width: 75px; height: 21px"/>
       </span>
       <span>
           <input type="button" id="btnMail" value="Mail" style="width: 75px; height: 21px" />
       </span>



and created click event for them as below,

PHP
$("#btnPrint").click(function (e) {
    window.print();
});

$("#btnSave").click(function (e) {
    alert("btnSave clicked");

    $.ajax({
        url: 'Index/SavePage',
        success: function (result) {

        }
    });
});


$("#btnMail").click(function () {
    alert("btnMail click");

    $.ajax({
        url: 'Index/MailPage',
        success: function (result) {
            $("#divFileUpload").html(result);
        }
    });
});




Thanks in advance.
Posted
Updated 5-Aug-14 1:17am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900