dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: zClip jQuery plugIn problem - copying text

  1. #1
    Join Date
    Aug 2009
    Posts
    46

    zClip jQuery plugIn problem - copying text

    Hi,

    Recently I've been trying to implement zClip jQuery plugin. Its main function is to copy text to the clipboard. It does that by overlying a link with some flash object and on the click event copying the text we want.

    The problem is that I can't implement it and it simply doesn't work, despite it seems to be extremely easy to install. The funny thing is that the demo on plugin's website works.

    I would appreciate if some JS geek would bother to install it on his/her own machine and let me know the results. I really ran out of ideas.

    http://www.steamdev.com/zclip/

    http://www.steamdev.com/zclip/js/jquery.zclip.min.js

    http://zeroclipboard.googlecode.com/...oClipboard.swf

    Thanks!

  2. #2
    Join Date
    Mar 2011
    Posts
    2
    I too am having the same problem, but I believe it could be to do with Localhost restriction. I'll be doing further tests this morning and update this post again.

  3. #3
    Join Date
    Mar 2011
    Posts
    2
    I found this on a blog entry -> http://www.deluxeblogtips.com/2010/0...clipboard.html

    Important: If you try to make your own demo, just remember to do it online, it doesn't work at local computer at all. This is a security restriction by Adobe Flash Player (yeah, another security reason!).

    I am still having problems binding the zClip copy process to a DIV and I can't seem to get the beforeCode: and afterCode: event working correctly.

    I want to use this zClip jQuery plug-in as it enables me to bind to a DIV which in my case is a DIV with no ID but contained within a table TD. I am currently trying to use zClip in-conjunction with jqGrid nav button.

    If I get a solution I'll post it back here.

  4. #4
    Join Date
    Jan 2013
    Posts
    4

    It is working for me

    <script type="text/javascript" src="/Scripts/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="/Scripts/jquery.zclip.min.js"></script>

    ...

    <script type="text/javascript">
    $(function () {
    ...
    $("#copy-to-clipboard").zclip({
    path: '/Scripts/ZeroClipboard.swf',
    copy: function () { return $('.results-display').text(); },
    beforeCopy: function () { $(".results-display").css("background-color", "lightblue"); },
    afterCopy: function () { $(".results-display").css("background-color", "inherit"); }
    });
    ...
    });

    ...

    <div id="MainContentPlaceHolder_ResultsDisplay" class="results-display"></div>

    ...

    <button id="copy-to-clipboard" type="button">Copy to Clipboard</button>


    Quote Originally Posted by callMeAl View Post
    Hi,

    Recently I've been trying to implement zClip jQuery plugin. Its main function is to copy text to the clipboard. It does that by overlying a link with some flash object and on the click event copying the text we want.

    The problem is that I can't implement it and it simply doesn't work, despite it seems to be extremely easy to install. The funny thing is that the demo on plugin's website works.

    I would appreciate if some JS geek would bother to install it on his/her own machine and let me know the results. I really ran out of ideas.

    http://www.steamdev.com/zclip/

    http://www.steamdev.com/zclip/js/jquery.zclip.min.js

    http://zeroclipboard.googlecode.com/...oClipboard.swf

    Thanks!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles