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 4 of 4
  1. #1
    New Coder
    Join Date
    Aug 2004
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Auto Copy selected text

    How to make when someone selects something in the body of the page to put this text in the clipboard (no html tags, no other text, just the selected)?

  • #2
    Regular Coder
    Join Date
    Jan 2003
    Posts
    867
    Thanks
    4
    Thanked 8 Times in 8 Posts
    Here's a link to an example:
    http://www.dynamicdrive.com/dynamicindex11/copytext.htm

    Most browsers won't support this though. We don't want you touching our clipboards. If I want to copy, I will press ctrl+c.

  • #3
    New Coder
    Join Date
    Aug 2004
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I will use this only under IE 6.0, this is the only browser that my plug-in supports...

  • #4
    New Coder
    Join Date
    Aug 2004
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok.... it works... 10x a lot man, ammm just a few more things... How can I make this part of the script:
    function copyit() {
    if (bBool) {
    tempstore=copiedtext
    document.execCommand("Copy")
    copiedtext=window.clipboardData.getData("Text");
    bBool=false;
    }
    }
    unselect the text after the text was copied,
    Last edited by soundreamer; 01-24-2006 at 01:43 PM.


  •  

    Posting Permissions

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