2

I am using zeroClipboard but I don't manage to have it working.

Here is my HTML markup:

    <div id= 'd_clip_button'>
        <img class = 'displayed' src="{{ asset('bundles/yopyourownpoet/images/CopyPoemPage8.png') }}" alt="Copy Poem" height="71" width="300" />
    </div>

And the javascript:

        <script src="{{ asset('bundles/yopyourownpoet/js/ZeroClipboard.js') }}" type="text/javascript"></script>
    <script>
        $(document).ready(function() {
            ZeroClipboard.setMoviePath("{{ asset('bundles/yopyourownpoet/flash/ZeroClipboard.swf') }}");
            var clip = new ZeroClipboard.Client();
            clip.setText( "aaaa" );
            clip.glue( 'd_clip_button' );
            clip.addEventListener( 'onLoad', function(){ alert('loaded baby'); } );

        });
    </script>

I see the alert 'loaded baby'. However, I never have the text copied in my clipboard. I tried on local on my computer and on the server as well.

I also went to this page http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04a.html and autorized flash, but still not working.

What could I be doing wrong?

fkoessler
  • 6,932
  • 11
  • 60
  • 92

2 Answers2

4

If you are having troubles with zeroClipboard, you might want to give this jquery plugin a try: http://www.steamdev.com/zclip/

zclip is based on zeroClipboard. Easy to install & easy to use.

fkoessler
  • 6,932
  • 11
  • 60
  • 92
  • 1
    Like @DavidCarr said ZeroClipboard is still maintained. For example [this is the latest commit](https://github.com/zeroclipboard/zeroclipboard/commit/e440548506e83a4c974eb94ec17cde98f57cbe1c) - today! :-) – Ionică Bizău Jan 29 '14 at 18:40
2

FYI...ZeroClipboard project seems to still be active...just touched as of 2013.Aug.31: https://github.com/zeroclipboard/ZeroClipboard

And I have just successfully used it in my Visual Studio 2010 ASP.NET C# project using ASP controls. Cool! Bump!

Community
  • 1
  • 1
David Carr
  • 400
  • 4
  • 7