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.
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.
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.
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.
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.
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:
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;
That did it. I can now capture the entire URL and it works in IE.
Thanks a lot!!!