How to make a screenshot to a folder or sent by e-mail?

Hello. Make that the screen was displayed in the box. But how to make so that it is stored in a folder or sent by e-mail?
<a href="javascript:getScreenshot()"> Send</a>
<div id="box1"></div>

function getScreenshot() {
 html2canvas(document.body {
 onrendered: function(canvas) {
$('#box1').html("");
 $('#box1').append(canvas); 
}
});
}

#box1 {
width:400px;
height:300px;
 border-style: solid;
 border-width: 2px;
}
canvas {
 max-width: 100%;
 max-height: 100%;
}
July 9th 19 at 11:05
2 answers
July 9th 19 at 11:07
Solution
The service where to send base64 content pictures that will make all the rest of the rights not be enough for the rest, I think.... well, or plug your ...subscribed.

Service can be the backend of your website.
Thanks for the reply. Can you describe in more detail ( for those who in the tank ). Or maybe a link to the article where you can read more. Frankly, little is understood of what You said. But to understand really want. - Rae.Beahan commented on July 9th 19 at 11:10
For starters, tell us on what does the service part of the website and can it be changed? Php ,python : - mercedes commented on July 9th 19 at 11:13
: Service parts no. Explain what you want to achieve.
There is a landing page that has a link to "Get a discount". When you click on it a window POPs up, which is a drum with a percent discount ( here's an example: studiosamurai.ru ). The visitor turns the drum ( Yakubovich hi ) , then enters email and pressing the send button is screen and is sent to the email well, or saved in a folder. This is necessary in order to understand what % discounts are intended a particular client. Can I bother much? - Rae.Beahan commented on July 9th 19 at 11:16
: I honestly do not understand Where the code is executed? In the developer console or what? Or code inside the page? - mercedes commented on July 9th 19 at 11:19
: Inside pages - Rae.Beahan commented on July 9th 19 at 11:22
: So is there a website that can be edited. So the service part of some kind there ? Is there a pure text only. - mercedes commented on July 9th 19 at 11:25
The website is written in html and css : - Rae.Beahan commented on July 9th 19 at 11:28
: Yes , text only.
I see the decision - a minimal service part(which may result in money), which will send letters. Another option can't think, unfortunately, good.
-----------------------------------------------------------------------------
On the other hand of course you can show a link,whose address is base64 data (the url is the full content of the pictures ,Google) and offer the customer to save the picture. Don't know what is. - mercedes commented on July 9th 19 at 11:31
Thank you very much. I will try : - Rae.Beahan commented on July 9th 19 at 11:34
and you can not just take the discount?))) screenshot-why - this size is somehow generated. or this isn't your fad and are written in incomprehensible technology? - Rowena commented on July 9th 19 at 11:37
July 9th 19 at 11:09
Solution
To generate your fin. losses (even for marketing purposes) without the server on the client side - this is the height of madness!
Generate ONLY on the server animerama (as now done), after stopping the drum number shall be shown that PRE-js received from the server via ajax and put in the server session.
Sending mail with a picture too through the server.
The picture can be done directly on the server or pick up as base64 string in a hidden-form field.
--------------------
No server at all (when it's not about the money))) ):
1. Google forms to send mail and various data
2. Save the file with the picture locally: FileSaver.js
3. You can play with the mailto:Protocol
generation of the fact of the bonus only on the server so no fakes from the client. If it's just attracting customers - it doesn't matter. - Rae.Beahan commented on July 9th 19 at 11:12
: +100500 - mercedes commented on July 9th 19 at 11:15
with mailto, you can not play,there is hypertext markup language, you cannot add, plus do not always configured for mail + not to send the chain letter to yourself)
But I could be wrong.., - Rae.Beahan commented on July 9th 19 at 11:18
: in this joke: you can make the generation of themes (promo code) and message text to send.
And on page to write: "If Your letter will come from corporate email discount multiply by x2!"
And in small text: "Send the letter, I agree to receive periodic marketing mailings and specials.proposals to your email address."
)))) - mercedes commented on July 9th 19 at 11:21
: =)
What specializiruetsya? - Rae.Beahan commented on July 9th 19 at 11:24
: analyst of business processes - mercedes commented on July 9th 19 at 11:27
: =) - Rae.Beahan commented on July 9th 19 at 11:30

Find more questions by tags Web Development