0

I have an image rendered by browser. I want to provide a functionality to my clients wherein they can just click a button and the JavaScript code should take the snapshot of the screen image (Screen) and prompt the users with "Save As" option. I am using IE.

Can anyone kindly help me with this?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
codeLover
  • 3,720
  • 10
  • 65
  • 121
  • What does "image rendered by browser" mean exactly? – Bemmu Jun 27 '11 at 07:35
  • possible duplicate of [Take a screenshot of a webpage with javascript?](http://stackoverflow.com/questions/60455/take-a-screenshot-of-a-webpage-with-javascript) – kapa Jun 27 '11 at 07:51

1 Answers1

2

You won't be able to do that with plain javascript due to security restrictions (imagine if a site could take a snapshot of your banking details).

Since you mentioned that you are targeting Internet Explorer, you can do it with an ActiveX control as mentioned in this answer: Take a screenshot of a webpage with javascript?.

Alternatively, you can use a java applet as mentioned in this answer: How can you get a screenshot from someone's web browser?

Community
  • 1
  • 1
Caspar
  • 7,039
  • 4
  • 29
  • 41