javascript - Jquery ZeroClipboard or Zclip nothing in clipboard IE 8 and 7 -



javascript - Jquery ZeroClipboard or Zclip nothing in clipboard IE 8 and 7 -

i'm using jquery plugin zclip or zeroclipboard copies content clipboard via button or link. info re-create , links/buttons activate loaded using ajax needs utilize plugin, attach elements after have loaded so:

$('#ajaxbutton').live('click', function() { $.ajax({ type: "post", url: "ajax.php", success: function(msg){ $('a.ajaxcopymulti').zclip({ path:'js/zeroclipboard.swf', copy:function(){ homecoming $('p#ajaxdescription').text(); } }); }); });

and in ajax.php example:

<p id="ajaxdescription">ajax description copied clipboard</p> <p><a href="#" id="ajaxcopy">click here re-create above text</a></p>

works other browsers ie 7 , ie 8. error:

unknown runtime error: zeroclipboard.js, line 135 character 3

so in plugin code change:

this.div.innerhtml = this.gethtml(box.width, box.height);

to:

$(this.div).html( this.gethtml( box.width, box.height ) );

which gets rid of runtime error, nil appears copied clipboard ie 7 , 8. familiar plenty give help? thanks.

ok, found what's going wrong in case. same problem expierience.

ie gives error @ line

this.div.innerhtml = this.gethtml(box.width, box.height);

next line is

appendelem.appendchild(this.div);

here append this.div element "appendelem". appendelem dom object , depends placed html re-create fields in html code. precise sec level parent. error thrown when appendelem can't contain this.div kid node. in case re-create fields in table cells. appendelem in case row object can not contain divs (firefox smart plenty clean code). wrapped copyfields in divs appendelem div object. know object appendelem containing add together , alert function, this:

alert(appendelem); appendelem.appendchild(this.div);

hope helps!

kasper taeymans

javascript jquery ajax internet-explorer-8 internet-explorer-7

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -