views:

63

answers:

1

On Firefox (at least) JavaScript copy and paste functions are disabled by default. Is there anyway to check if the functionality is available so i can hide some buttons if its not?

A: 

Tested in IE8, FF3.6.10, Chrome 3.0.195. Safari 4.0:

if(typeof(window.clipboardData)=="undefined") {
  alert("not working")
}
else {
  alert("working")
}
Steve