View Full Version : javascript for copy, paste functions

08-30-2006, 08:09 PM
Is there any script for "copy", "paste"?

08-30-2006, 08:35 PM
There is some code but it isn't really JavaScript and it only works in IE.


I don't know about supporting the others [Firefox, Mozilla, NS, Opera].

If you are working on an internal and/or Intranet tool where you can control the browser used you can do some cool stuff, but for universal Internet use I don't think there is anything. Maybe someone else can provide a bit more clarification.

08-31-2006, 03:26 AM
I'm thinking of selecting and copying from an iFrame and then pasting in a textarea in the parent frame. Instead of doing this routine over and over I was hoping there might be an easier may of copy/paste.

08-31-2006, 03:49 AM
Javascript is restricted to the web page.

Copy/Paste are functions of the operating system.

The one has no access to the other unless there is a security hole in the browser to connect them.

08-31-2006, 12:00 PM
This might help you with Firefox: Granting JavaScript access to the clipboard in Firefox (http://kb.mozillazine.org/Granting_JavaScript_access_to_the_clipboard).

Unfortunately, I don't know how it would be done in IE, but I'm sure it's possible, otherwise RTEs like TinyMCE and FCKEditor would not work - right?