Send an email with the editable pdf placed in an iframe - ajax

I have a website built with Laravel and I need that the customer fills a editable PDF and send it to an specific address.
Instead of asking them to download it, fill it in local and then send it, I have created a new page in my site where I placed the editable PDF using an iframe.
Now, I would like to add a button that once the customer fills the PDF, it sends it automatically.
Does anybody know how to achieved this or is it not possible?
I am trying to do it using ajax, calling a method in my controller that will send the email using a template and with an attachment, but I don't know how to pass the PDF filled to it from the view(iframe).
Thank you in advance

Related

Show an attachment in customer portal

In my widget, I want to display attachment image on to customer portal page. I have created a custom object called 'Events'.All events must have images. So I stored images as attachments. Now we want to display attachment image as thumbnail So I need URL of attachment. I don't how to get URL of attachment.
File attachments aren't exposed to the web server, so you cannot simply reference a path to serve the image based on your object id. You could implement an API call from the controller/widget that queries for the file attachment and then inserts the image into the DOM. This could be done server-side with CPHP; use the FileAttachment sub-object on your custom object to collect the base64 encoded data of the image and then output it in the DOM. Alternatively, you could call the REST API through JavaScript and update the DOM during/after page load to get the image.

Include an image into a "mailto" mail?

The title might not be clear - I'm creating an app in Unity and I want it to start the device's default mail client to create a new mail. I can easily do that with mailto. What I don't know how to do is include an image in the mail being composed. In any way: as an attachment, as a part of the mail body or whatever. But it's a local image, so I can't just put a link to it in the mail.
Is it even possible? If so, how?
I doubt if you can do it as the mailto page doesn't mention this as one of the parameters.
At best you can add body and subject.No attachments I suppose
See http://www.faqs.org/rfcs/rfc2368.html
However a hack you can try is in the body that you include
add <img src="your image src"> and hopefully the mail client will recognise this as html markup and render the image when the client opens up.
I haven't tried this though.

Uploading and saving images in mvc 3 before post

I have a problem with images in my web app. let say I have a form where there are some text fields, dropdowns, upload ajax control for multiple image upload and button Save.
I know how to upload images and posting a form and saving everything to database but the problem is that I want to achieve the following user experience:
User can upload multiple images and browser after successful upload shows thumbnail (this I know how to do it)...the problem here is that I do not want to save images to db before button save is pressed. Is there any convinient how to save temporary images...I have tried temp table which after button is pressed, copies all images to image table but here is browser refresh problem that looses all the data and images stay in a temp table. Can you use a session for storing temporary images or any other way (I think session is not particulary good idea for such things.)
One easy way to achieve that is to use the HTML5 File API and display a thumbnail once the user selects a file to upload. You don't even need to waste bandwidth as everything happens on the client. Once the user submits the form, then the image will be uploaded to the server.
Another possibility is to use one of the gazillions of available AJAX upload controls such as Uploadify, Valums Ajax Upload, Uploadify, the jQuery form plugin, ... which will allow you to upload the file to the server using an AJAX request so that you can resize it there and return the resized image to the client that you could display the thumbnail on the client.

using ckEditor to send emails, problem with images

I'm using the ckEditor (http://docs.cksource.com/CKEditor_3.x).
my goal is to send the the text entered as an email message.
I get the contents of the editr as suggested in the docs:
var message = CKEDITOR.instances.editor1.getData();
then send the message to a webmethod on the server side, and it sends ok.
the problem is: the images are added as an img tag, and get the local directory address, so it cannot be viewed on the recipients side.
how can I add the images to the email message?
thanks in advance!
You need to use a file uploader. CKFinder integrates nicely with CKEditor. Free for demo use (and open source projects I think), but about $70 for commercial use.

CakePHP Ajax Add form from View (related )

i´ve got a view of my client (http://localhost/client/view/3) and in related section I have his adress.
Cakephp automatically builds that. When you click on Add Adress button new page comes up (http://localhost/addess/new) and when you save that it goes to http://localhost/addess/index
what I need is to ajax this view and get all working together. I need to go to http://localhost/client/view/3 push Add Adress and get addrees/new form visible (<- easy with jQuery) but how can I save the new adress and get adress div updated??
any example??
thanks
The php script you make the AJAX call to is where you need to do the save. When you have done that, you can pass out the data for the address div as xml or a javascript object and read it with the AJAX javascript in the original view.

Resources