none
Tile url helper tool doesn't work in IE9

    Question

  • Asked over here: http://social.technet.microsoft.com/Forums/en/ieitprocurrentver/thread/f4e0842c-86d9-43d2-9193-c2a0e4fe4303

    Was told to post over here even though it was already asked over here

    http://social.msdn.microsoft.com/Forums/is/iewebdevelopment/thread/774b93e3-ccd1-468f-a5e3-adcf5f9d5835

     I use this titleurl file and it doesn't work in IE9 The htm has this: The registry key adds a value in the right mouse click context menu to call this html file and then it copies the title and url of a page into your clip board. On IE9 it fails with An error has occurred in the script on this page Line 17 Char 3 Error Permission denied Code 0 url: file:///c:/windows/web/TITLE_URL.HTM What do I need to do to get this to work?

    <!--
    Title_URL right-click context tool for IE4+
    Bill James - bill@billsway.com - rev 2 Nov 2000
    -->
    <form name=a><textarea name=a1></textarea>
    <SCRIPT language=javascript defer>
    //To disable popup confirmation, change "showConfirm=1" to "showConfirm=0"
    var showConfirm=0
    var oExtArgs=external.menuArguments;
    var sTitle=oExtArgs.document.title;
    if(sTitle=='')(sTitle='No Title');
    /*
    kludge - to keep newlines we must set text in
    textarea, then create textRange and copy that.
    */
    var oTarget=document.a.a1;
    oTarget.value=sTitle+': \r\n'+oExtArgs.location.href+'\r\n';
    oTarget.select();
    var oTextRange=oTarget.createTextRange();
    oTextRange.execCommand('copy');
    </SCRIPT>

     

    Wednesday, March 23, 2011 1:20 AM

Answers

  • With EXTREME thanks to Ramesh Srinivasan

    Who posted up...

    Changing the following line:

    oTarget.value=sTitle+': \r\n'+oExtArgs.location.href+'\r\n';

    to

    oTarget.value=sTitle+': \r\n'+oExtArgs.document.URL+'\r\n';

    Makes it work in IE9/IE8 (and probably in earlier versions as well).

    Credits to Socrates (Soc) Trikes, IE MVP

    Friday, April 01, 2011 1:18 AM

All replies