javascript - window.clipboardData.getData("Text") returns 0 in IE8 -


i'm trying implement maxlength on textarea. in ie7, window.clipboarddata.getdata("text") returns correct number of characters copied. in ie8, same call returns 0. what's wrong?

here js

var somerule= {   "textarea" : function(element) {     element.onpaste = function() {       var copied = window.clipboarddata.getdata("text");       alert('copied length = '+copied.length);     }   } };  behaviour.register(somerule); 

alt text

there security setting in ie8:

to prevent web site reading clipboard, take following steps:

go tools->internet options. click on security tab. click on "custom level." scroll down scripting section under settings. set "allow paste operations via script" disable or prompt. press ok buttons close dialog boxes.

in case, setting disabled.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -