6 Replies Latest reply on Jul 31, 2018 10:35 AM by alexg57402100

    Responsive Help URL

    alexg57402100 Level 1

      I have included a Share Page button with my Responsive Help and am using JavaScript with window.location to generate an email with the current page URL. The problem i'm having is that the email only uses the URL up to a certain point. I publish to SharePoint and JS only adds the URL up to the .ASPX and does not include any of the data RoboHelp 2017 adds to the URL.


      Topic URL (Example)

      https://xjhydmyethwslzvtzjwvofevshoewk /topic.aspx#t=topics%2Fxjhydmyethwslzvtzjwvofevshoewk %2Fc_xjhydmyethwslzvtzjwvofevshoewk .aspx


      Email Generated URL (Example)

      https://xjhydmyethwslzvtzjwvofevshoewk /topic.aspx


      Also, when I copy and paste the link to Excel or Word and navigate to the site from the URL it goes straight to the home page instead of the topic page.


      ***After further review, it appears to be a Internet Explorer issue. Chrome generates the entire URL in the email when the JavaScript runs the window.location.



        • 1. Re: Responsive Help URL
          lisabj4 Level 1

          alexg, I have the same problem with Responsive HTML using RoboHelp 2015. We want to be able to email the URL of a specific topic to another person and in IE (which is our corp standard browser) it doesn't include the extra text of Home.htm#t= in the URL sent in the email (for example, https://<internallocation>/Home.htm#t=<topic>) . My code works for Chrome but not IE. We had no problem with this when we generated Webhelp but now that we are generating RHTML5 this additional text is in the URL and my code doesn't work. I've tried the following properties in my code and none of them work: location.ref, window.parent.location.href, project.location.href, and window.parent.location. Hopefully, someone else has an idea for this now there are two of us with the same issue.

          • 2. Re: Responsive Help URL
            Amebr Level 4

            Theoretically you shouldn't need to exactly duplicate the URL that displays in the address bar. (I think it's to do with loading the skin? or synchronising the toc? or something...) The window.location.href should be the direct path to the topic (the site address + the stuff after #t ) and should open the topic, although you might need to click the Show link to load the toc/skin.


            Address bar: my.site.com/Home.htm#t=path/my_topic.htm

            Script path : my.site.com/path/my_topic.htm


            I tried it in RH11 Responsive HTML5 (Theme1_Standard) run on my C drive, and clicking the path inserted in the email did open the correct topic. I tried both IE and Chrome. It's possible something changed in RH2015+ though.


            This is the basic link I added to a test topic.

            <a href="#" onclick="javascript:window.location='mailto:test@example.com?subject=Testlink&body= ' + window.location.href">some</a>



            Have you confirmed that clicking the link doesn't open the correct topic? I wasn't sure if you'd tried, or just saw that the text didn't exactly match.



            I don't know anything about asp, so it might have different constraints. You might need to get some asp developers to help .


            Not sure if that helps, but might provide ideas of what to look at.

            • 3. Re: Responsive Help URL
              lisabj4 Level 1

              Thanks Amebr for your info.


              We've had two different things happen when we did our testing:


              • IE cut off everything after the # (ie. #t=) then the URL sent by the mail client is my.site.com/Home.htm so the link then goes to the home page and not the topic.


              • The other thing we've had happen is that the htm file is in the URL sent to the email client like you mention (my.site.com/path/my_typic.htm) but it links to an unformatted html file without the screen layout.


              It sounds like a RH2015+ issue. I don't know why RH added the Home.htm#t= to the URL in the display bar except to ensure that if someone copy/pasted the URL it would go to the correct place and is formatted with the screen layout.


              By the way I tried your code and the second bullet was my result. I'm trying some additional things and if I find a solution I will post it here.

              • 4. Re: Responsive Help URL
                Amebr Level 4

                With the second bullet, there should be a Show link to click at the top of the page - the wording may be different as I think it's customised in the Language settings in your project. Or maybe it was removed for some reason in the skin you're using, or from RH2015. (And I think there's a way to always show the skin, but I can't remember how.)


                Also, if you can post exactly how you're creating the email, maybe that will help figure out what's going on.

                • 5. Re: Responsive Help URL
                  lisabj4 Level 1

                  After playing around with this for a while I finally got it to work. To my master page I added the property "encodeURIComponent(parent.location.href)" to our mailpage function (in bold below) and it worked perfectly for RHTML5 output. Here is an example of what we use so the user can click an icon on all our topics and it opens an email to send the topic link to another user:


                  <script type="text/javascript">function mailpage(){

                  mail_str = "mailto:?subject=Check%20out%20this%20page:%20" + document.title;

                  mail_str += "&body=I%20thought%20you%20might%20be%20interested%20in%20the%20" + document.title;

                  mail_str += "%20document%20in%20the%20Online%20Help."

                  mail_str += "%0D%0DYou%20can%20view%20it%20at:%20" + encodeURIComponent(parent.location.href);

                  mail_str += "%0D%0DTip:%20If%20the%20hyperlink%20above%20doesn't%20work%20correctly,%20copy%20and%20p aste%20the%20entire%20URL%20into%20your%20browser's%20address%20bar.";

                  location.href = mail_str;


                  • 6. Re: Responsive Help URL
                    alexg57402100 Level 1

                    That did it. I can now capture the entire URL and it works in IE.


                    Thanks a lot!!!