feedback.js is a great jquery plugin that allows you to create feedback forms which include a screenshot, created on the clients browser, along with the form.
how can I
Indeed, feedback.js is an incredible piece of javascript. Thank you very much, Niklas von Hertzen! It does not depend on jQuery, though, but you can use both in the same page.
You can send the image to a server by passing the 'url' option. The Feedback function supports many options, for example:
Feedback({h2cPath:'/js/html2canvas.js',
url: '/send/email/uri/on/server',
label: "Send an email",
header: "Let's send an email!",
messageSuccess: "Done!",
messageError: "Uh oh..."
})
The URL specified in the url is called using the HTTP POST method, with the image in the 'data' parameter. The image itself is encoded as a DOMString. If you want to know what it contains exactly, look at the specification of toDataURL. Other information that your users have entered comes in other parameters, depending on the form-fields you define.