I am having trouble creating multiple instances of a Zeroclipboard instance in my code, with each instance launching a popup after calling it.
<a class="xxx" href="popup.url.php" ><span >FRSDE3RD</a>
<a class="xxx" href="popup.url2.php" ><span >FRSDE3RD2</a>
<a class="xxx" href="popup.url3.php" ><span >FRSDE3RD3</a>
$(document).ready(function(){
ZeroClipboard.setMoviePath( 'path/to/swf/ZeroClipboard.swf' );
clip = new ZeroClipboard.Client();
clip.setHandCursor( true );
$('a.xxx').mouseover( function() {
var url = $(this).attr("href");
var code = $(this).children('span').html();
clip.setText( $(this).children('span').html() );
clip.glue(this);
clip.addEventListener('onMouseDown', function(){
clip.reposition(this);
clip.setText( code );
});
clip.addEventListener('onComplete', function(){
clip.reposition(this);
popUp(url);
});
});
});
function popUp(URL)
{
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=1024,height=768,left = 328,top = 141');");
}
I managed to create a copy in the functionality of the clipboard, but if I use onMouseUp, the onComplete events to trigger the pop-up function, it either fires like 4-5 pop-ups, or it doesn't fire at all.
PS I tried to adapt the solution from How to upload an Ajax response to the clipboard using jQuery and ZeroClipboard? instead of calling ajax, just copying it to the clipboard and in full screen mode a popup ... as I said, it did not work for me.
, flashblocker, , , CODE, , , 3-4, . , . ?