Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8414975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:18:39+00:00 2026-06-10T01:18:39+00:00

I am using zeroclipboard to add a copy link to each row in a

  • 0

I am using zeroclipboard to add a “copy” link to each row in a fairly large list, within a user script. To accomplish that, I using a method similar to the one listed on this page, where the ZeroClipboard.Client() element for each row is created when the user mouses over the row. This is working great in FireFox, but not in Chrome.

Also as a note: I copied the contents of the ZeroClipboard.js file into the user script itself instead of including it in an external file.

Here is the markup that creates the copy button for each element
<span style="color:blue; text-decoration:underline; cursor:pointer" id="copy_'+id+'" class="CopyLink" link="'+url+'" onmouseover="clipboard.add(this)">Copy</span>

Here is the code segment that adds the clipboard’s client object:

function main(){
    window.clipboard = {
        load: function (){
            if(!clipboard.initialized){
                ZeroClipboard.setMoviePath("http://www.swfcabin.com/swf-files/1343927328.swf");
                clipboard.initialized=true;
                console.log("Clipboard intialized");
            }
        },
        add: function(element){
            clipboard.load();
            var clip = new ZeroClipboard.Client();
            console.log('Clipboard client loaded: ' + element.id);

            clip.glue(element, element.parentNode);
            console.log('Clipboard glued: ' + element.id);

            clip.setText(element.getAttribute('link'));
            console.log('Clipboard text set: ' + element.getAttribute('link'));

            clip.addEventListener('complete',function(client,text) {
                console.log('Clipboard copied: ' + text);//doesn't fire in chrome
            });

            clip.addEventListener('load',function(client) {
                console.log('Clipboard loaded: ' + element.getAttribute('link'));
            });
        }        
    }
    //other code in user script including injecting above markup
    //as well as contents of ZeroClipboard.js
    window.ZeroClipboard = { ... }
}

var script = document.createElement("script");
script.appendChild(document.createTextNode('('+main+')()'));
(document.head || document.body || document.documentElement).appendChild(script);

In this block, every console.log fires in FireFox when I mouse over and click the copy span, but in chrome, all except the ‘complete’ listener fire. I was able to verify that ZeroClipboard is working in my Chrome by using the example on this page. I am also able to verify that the flash object is being added to the page in the correct location, but it is simply not responding to a click.

Since the zeroclipboard code is no longer being maintained according to the site, I’m hoping someone out there can help me out. I’m thinking there is possibly some issue with dynamically adding the embedded flash objects in chrome on mouseover, or perhaps some difference between user scripts in chrome vs firefox with greasemonkey? Any help would be greatly appreciated, thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T01:18:41+00:00Added an answer on June 10, 2026 at 1:18 am

    I’m not sure the reason behind it but I have been running into this on Chrome as well. I had two zeroclipboard implementations, one that was visible on page load, and one that was only visible when the user opened a dialog. The one that was visible on page load worked as expected, but the other one didn’t. In order to “solve” the issue, I had to render the zeroclipboard link, set its absolute position to be off the screen (-500 px), then add some javascript to move the link into place when the dialog opens. This is an ugly solution but I think is the only way to get it to work in Chrome. Your case is particularly hairy since you have lots of dynamic zeroclipboards on your page whereas I only had one, but it seems to me that there’s no reason this won’t work for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building <div> elements using AJAX, and I want to add ZeroClipboard functionality. Firebug
I am using jquery ui dialog in my page and surprisingly the zeroclipboard copy-to-clipboard
I'm using http://www.steamdev.com/zclip/#usage to copy some text to the clipboard and that code is
Im trying to copy data to clipboard using zclip jquery. problem that im facing
Using C#, I need a class called User that has a username, password, active
I'm working on copy to clipboard using the zeroclipboard api,. I made a simple
Using Server.Transfer to show a page that informs the user that the web site
I am using ZeroClipboard to copy code from a generator which can then be
I am having trouble copying text using zeroclipboard. This is my html code: <dl
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.