title: Copy image to Clipboard not working in Firefox & Chrome
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/400212/how-to-copy-to-the-clipboard-in-javascript">How to copy to the clipboard in JavaScript?</a>  </p>
  </blockquote>
  
  
  
  <p>I need one help regards JavaScript. I used this script in asp.net website.</p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
          function CopyToClip() {
              var imgControl = document.getElementById('imageControlWithImageToCopy');
              imgControl.contentEditable = 'true';
              var controlRange;
  
              if (document.body.createControlRange) {
                  controlRange = document.body.createControlRange();
                  controlRange.addElement(imgControl);
                  controlRange.execCommand('Copy');
              }
              imgControl.contentEditable = 'false';
              return true;
          }
      &lt;/script&gt;
  </code></pre>
  
  <p>This code for copying image (which is in an image control) to clipboard and it works fine in IE.</p>
  
  <p>But this script is not working in Firefox &amp; Chrome.</p>
  
  <p>Please suggest any good solution to work in Firefox &amp; Chrome</p>