Copy to Clipboard feature - wordpress

Discussion in 'Programming' started by ddzc, Nov 6, 2008.

  1. #1
    Hi everyone,

    I'm trying to embed the copy to clipboard feature. Basically, I want certain text or a link name highlighted and when a user clicks on the text/link name, it copies it to your clipbaord (equivelant right click - copy).

    I can't seem to find any scripts that work without javascript. I checked a javascript page by wordpress but i'm quite confused (I don't have much experience with programming). Can someone break it down for me and advise on how I can accomplish the copy to clipboard feature or how to enable javascript so I can use the code given to me?

    Here is a source of the feature i'm trying to do:

    http://www.htmlgoodies.com/beyond/javascript/article.php/3458851
     
    ddzc, Nov 6, 2008 IP
  2. snvc

    snvc Peon

    Messages:
    194
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Is this the one you'er looking for? You can copy and paste the url to download the code.
     
    snvc, Nov 8, 2008 IP
  3. ddzc

    ddzc Peon

    Messages:
    487
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    ddzc, Nov 8, 2008 IP
  4. snvc

    snvc Peon

    Messages:
    194
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I assume you did not select paste. It copied sliently and compatibility with most browsers. The code you posted only for Internet Explorer.
     
    snvc, Nov 8, 2008 IP
  5. ddzc

    ddzc Peon

    Messages:
    487
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hi,

    I definitely pasted it and it didn't work. But for some reason it's working for me now..odd..

    The only concern I have is implementing this in wordpress. I don't think wordpress understands javascript. I tried using the code and it doesn't work. IE also posts "Error on Page" on the bottom when this code is live on my homepage..when I click on the search bar the error on page flashes. I need to re-configure something in wordpress to allow javascript code to run...any ideas?

    Thanks
     
    ddzc, Nov 10, 2008 IP
  6. ddzc

    ddzc Peon

    Messages:
    487
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    anyone??....
     
    ddzc, Nov 11, 2008 IP
  7. ddzc

    ddzc Peon

    Messages:
    487
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Hey guys, i'm still trying to do this. I was told I have to use javascript and flash to get this working. Anyone have any easy to understand working codes for this? Thanks
     
    ddzc, Dec 5, 2008 IP