Jquery ZeroClipboard or Zclip nothing in clipboard IE 8 and 7

三世轮回 提交于 2019-12-05 18:16:26

Ok, I found what's going wrong in my case. probably it will be the same problem as you expierience.

IE gives an error at this line

this.div.innerHTML = this.getHTML(box.width, box.height);

next line is

appendElem.appendChild(this.div);

here we append this.div to the element "appendElem". appendElem is an DOM object and depends from where you placed your html copy fields in your html code. to be precise it is the second level parent. the error is thrown when appendElem can't contain this.div as a child node. In my case my copy fields where in table cells. the appendELem is in this case a Row Object which obviously can not contain any divs (firefox is smart enough to clean up the code). I wrapped my copyfields in extra divs so appendElem will be a DIV object. to know what object your appendElem is containing just add and alert function, like this:

    alert(appendElem);
    appendElem.appendChild(this.div);

hope this helps!

Kasper Taeymans

Also do make sure that your Browser is updated with Flash Plugin for it to work correctly.

I just met this problem, and has solved it. This is because of the improper html tag, the jquery plug-in will add a flash layer with the div, so make sure the html tag outermost layer is div, that is ok.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!