How to capture div element and upload it automatically to server as a picture with jQuery?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Nick is right. There would be a number of security issues relating to browser executed screenshots which are then saved to your site (think banking information).
An alternative would be doing this in a graphics library, based on the html contents of the div.
For example, if you are using PHP for your back end, you could use jQuery to fetch the contents of your ‘div’ element and pass it to a file via $.get(). Using GD library and knowledge of your stylesheet, and some HTML tree parsing, you supposedly could reproduce the ‘div’ as an image.