3

Is it possible to get/read the clipboard of a client with jQuery?

(I need get the information of a spread sheet and paste this information in a jqGrid web grid...)

Yarin
  • 173,523
  • 149
  • 402
  • 512
MiBol
  • 1,985
  • 10
  • 37
  • 64

3 Answers3

1

Well according to this similar SO question it cannot be done with just JavaScript. Which is good, because it would be a major security risk. You need a small flash object to get the functionality you want.

In any way, this is a duplicate question.

Community
  • 1
  • 1
BernardMarx
  • 916
  • 8
  • 17
  • 2
    Its also a question that can be solved with a simple Google query. –  Jan 20 '11 at 08:32
  • Yeah it isn't a javascript thing. Except in IE. Funny this is the only cool part of IE (IE6 does it without question, IE7 alert the user about it). – Ákos Nikházy Jan 20 '11 at 08:59
  • thanks to answer! But I been reading in ZeroClipboard web page, and I found that with this object not is possible to read the clipboard... Anybody have any other idea? – MiBol Jan 22 '11 at 05:11
  • @BernardMarx- This isn't a duplicate - the answer you point to is about writing to clipboard, and MiBol's asking about reading from clipboard. – Yarin Nov 10 '11 at 15:49
  • This is a really, really old question. look at this: http://jsfiddle.net/ARTsinn/Gfw3D/ – Moe Singh Mar 26 '18 at 14:51
0

I did a workaround to accomplish the request. Basically I included a TextBox object into my Web Form with the legend "Paste your information [Here]. Using CTRL + V". Then, I read the event pressKey with jQuery (reading CTRL + V combination), then I can read the clipboard data in the TextBox.

MiBol
  • 1,985
  • 10
  • 37
  • 64
0

Does DataDrop – Drag Grid Data in From a Spreadsheet help? It would be drag & drop instead of reading the clipboard, but reading the clipboard is difficult to impossible.

pyvi
  • 675
  • 1
  • 4
  • 15