Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Mar 2005
    Posts
    735
    Thanks
    4
    Thanked 1 Time in 1 Post

    javascript for copy, paste functions

    Is there any script for "copy", "paste"?

  • #2
    New Coder
    Join Date
    Aug 2006
    Location
    Idaho
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts
    There is some code but it isn't really JavaScript and it only works in IE.

    http://search.msdn.microsoft.com/sea...siteid=0&tab=0

    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.
    Last edited by Scriptbanger; 08-30-2006 at 09:37 PM.
    .
    + Christ is the Rock - Rock On!

  • #3
    Regular Coder
    Join Date
    Mar 2005
    Posts
    735
    Thanks
    4
    Thanked 1 Time in 1 Post
    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.

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    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.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #5
    Regular Coder
    Join Date
    Nov 2002
    Location
    Bristol, UK
    Posts
    932
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This might help you with Firefox: Granting JavaScript access to the clipboard in Firefox.

    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?
    ithium | SOAPI | SDP | PTPScript manual
    "ithium is a non-profit webhost, which is pretty much unique. The mission of ithium is to provide free hosting resources for worthwhile and needy non-profit projects, which otherwise may not be able to obtain such facilities. The money from commercial customers goes to maintain ithium's servers and further development."


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •