0

How would you dump an image captured using the print sreen key into a div tag?

Dave Jarvis
  • 30,436
  • 41
  • 178
  • 315
Phil Jackson
  • 10,238
  • 23
  • 96
  • 130
  • Ctrl+PrtScn. Run paint.exe. Ctrl+V. Save. Upload file to web server. insert a [div] [img src="path_to_screenshot"] [div]. DONE! – Byron Whitlock Nov 23 '09 at 22:53

3 Answers3

2

You can't. Best way to do something like this is using a Java applet or ActiveX component.

clipboardData is available on IE, but doesn't support access to images. It is not supported by default in Firefox.

Jan Jongboom
  • 26,598
  • 9
  • 83
  • 120
1

I just tried creating a screen shot using print screen and inserting it to a rich HTML field in Firefox. It pastes an IMG tag with a link to a local temporary file (moz-screenshot.png). So in the local context (your own computer), it seems possible, but you are going to have a very hard time getting that local file to your server. Maybe with a tweaked Flash upload component.

Pekka
  • 442,112
  • 142
  • 972
  • 1,088
1

Short answer: You can't.

Now, that said, if you are using Javascript inside of an HTA file, you should read this thread: Take a screenshot of a webpage with JavaScript?

Hope this helps.

Community
  • 1
  • 1
BoltBait
  • 11,361
  • 9
  • 58
  • 87
  • This is good to know about and keep in mind. What a nice feature for any support system, for example. +1 – Pekka Nov 23 '09 at 23:54