This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Accessing clipboard from browser via JavaScript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Accessing clipboard from browser via JavaScript" Watch "Accessing clipboard from browser via JavaScript" New topic
Author

Accessing clipboard from browser via JavaScript

Mike Himstead
Ranch Hand

Joined: Apr 12, 2006
Posts: 178
Hi,

I'm looking for a way to mark several input fields on a webpage by mouse and copy the input fields' content to clipboard. Is this possible at all? The only usable technique I have in mind is JavaScript, but I don't know if can access the operating system's clipboard from within a browser. Any ideas or hints are appreciated.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
In the old days you were able to do this, but with today's security minded folks, it is not possible without browser settings to be changed.

People who do it use Flash [http://code.google.com/p/zeroclipboard/], but Flash is starting to restrict it too.

Eric
 
Consider Paul's rocket mass heater.
 
subject: Accessing clipboard from browser via JavaScript