Quantcast
Channel: Adobe Community : Unanswered Discussions - RoboHelp
Viewing all articles
Browse latest Browse all 5136

Adding Text to the Copy Event not working in IE

$
0
0

Hi,

 

The addTextToCopy() function I added to the Master page for my project works in every browser except for Internet Explorer (the problem child). I tried the

function on a test site and it works fine ... it is only in the FlashHelp output that the function does not work in IE. I would appreciate hearing your feedback and suggestions. Thanks for your time!

 

Thanks,

AV

 

PS : Just in case, this is the script :

 

<script language="javascript">

function addTextToCopy() {

         var selection = window.getSelection(),

               

            pagelink = '<br><br> My copyright text',

             copytext = selection + pagelink,

             newdiv = document.createElement('div');

 

         newdiv.style.position = 'absolute';

         newdiv.style.left = '-99999px';

 

         document.body.appendChild(newdiv);

         newdiv.innerHTML = copytext;

         selection.selectAllChildren(newdiv);

 

         window.setTimeout(function () {

             document.body.removeChild(newdiv);

         }, 100);

     }

 

     document.addEventListener('copy', addTextToCopy);

< /script>


Viewing all articles
Browse latest Browse all 5136

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>