5 Replies Latest reply on Jan 21, 2010 10:05 AM by NorBec

    Toolbar buttons work in preview, not in generated webhelp

    NorBec Level 1

      I'm using RH 8.0.2 to generate webhelp.

       

      I took advantage of a few snippets from Peter Grainge's site and have 3 new toolbar buttons for my project:

      toolbarButtons.png

      Here's where I need help.

       

      1. Report an Issue links to a sharepoint site on our network.  The link works fine, but displays inside the topic frame.  What is the proper Inline JavaScript to open the sharepoint page in a new window?  For ease of reply, say the link is http://www.mysite.com/issues/default.aspx

       

      2. Send link by Email sometimes creates a draft email when I click it in the preview pane, but I haven't figured out the reproducible conditions.  It doesn't seem to work in the generated files however. A similar issue seems to occur for the Copy Link to Clipboard button - sometimes works in preview, but not in generated webhelp.

       

      Notes:

      The Javascript I used for Send Link by Email, from Grainge's snippet 39, is:

      window.location=('mailto:someone@yourdomain.com?Subject=Useful Information&body=This page might be useful to you: ' + window.parent.frames[1].frames[1].document.title +' ' + escape(window.parent.frames[1].frames[1].document.location))

       

      Note, this script throws an error as you preview, 'window.parent.frames.1.frames.1.document is null or not an object.

       

      The Javascript I used for Copy Link to Clipboard, from Grainge's snippet 114, is:

      function CopyURL()
      {
      var myHerf=parent.frames[1].bsscright.location;
      var title=parent.frames[1].bsscright.document.title;
      if(window.clipboardData)
      {
      var tempCurLink=title + "\n" + myHerf;
      var ok=window.clipboardData.setData('Text',tempCurLink);
      alert("Press Ctrl + V to Paste the link in your email");
      }
      }

       

       

      Any help appreciated!