roscoe14smith
New Member
I'm having the following problem with the zclip. In my application I have a text box, then followed by a button. On clicking the button the value in the readonly text box is to be copied. My html code is:-\[code\]<input type="text" readonly="readonly" value="http://stackoverflow.com/questions/14601589/<%= linkbunch_url(@link.link) %>" class="span3" id="url_copy" /><br> <button type="button" id="copy_link" class="btn btn-success"><i class="icon-share" ></i> Copy To ClipBoard</button>\[/code\]My javascript code is as follows:-\[code\]$('#copy_link').zclip( { path: '/assets/ZeroClipboard10.swf', copy: function(){ return $('#url_copy').val(); }, afterCopy: function() { alert("Link was successfully copied"); console.log( "Test was copied to clipboard"); } });\[/code\]Most of the times on clicking on the button it's copying the text inside the box. But sometimes it's not. Then I inspected everything in firebug and got this thing shown in the picture.
Here the link "df..." is just a testing data, nothing else. Now my problem is, as shown in the picture when I click on the button nothing is happening. But I discovered that there is a div which is my invisible flash object came on the top of the "df..." link present. It's borders are visible in the picture. The code also visible in the firebug. Clicking on that portion of that page the text is copied again. So, why is it happening?? H