Reputation: 215
I am not sure what i am doing wrong but we run it as a local file C:\Users\Username\Desktop\common\Common.htm
I have no idea why it is not copying the text box. I have tried many different ways. Am i missing something. I have looked over the documentation but I believe it is poor. I have this code
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="ZeroClipboard.js"></script>
<textarea rows="14" id="scratch"></textarea>
<p class="align-right"><button id="d_clip_button" class="my_clip_button" title="Click me to copy to clipboard." data-clipboard-target="scratch" data-clipboard-text="Default clipboard text from attribute">Copy To Clipboard...</button></p>
<script>
$(document).ready(function () {
var clip = new ZeroClipboard($("scratch").each(function () { }), {
moviePath: 'ZeroClipboard.swf'
});
</script>
Upvotes: 0
Views: 41
Reputation: 4811
You may have issues using the ZeroClipboard file on a locally-hosted file:// page. See the relevant issue / discussion on Github here. If you can run a local webserver, you may be able to circumvent the issue.
Just to be clear -- accessing Flash objects locally (using file://) is usually a security issue prohibited by the browser.
Instructions from the ZeroClipboard team for circumventing the file:// issue are here.
Upvotes: 3