Adding a button that opens a webpage in the topic window.

New Here ,
Dec 31, 2019

Copy link to clipboard

Copied

I am needing to add a button to the toolbar that will open a webpage in the topic window. I know how to add a button and have it link to the external webpage by opening a new window but I am wanting to use the topic window as the target. Is there a library of JavaScripts where I can find the correct code to add?

 

Thanks

Hi mariaj46098905, 

I believe that your problem could be solved by changing the "_self" to "rh_default_topic_frame_name". 

  1. Under 'Custom Buttons' add new button and icon.
  2. Select the new button to change its properties.
  3. Under ‘JAVASCRPIT’ ==> ‘OnClick’ add the JavaScript Code: window.open("www.your_url_here.com", "rh_default_topic_frame_name") 
    This should open the specified URL in the topic IFrame.

Topics

Output presets

Views

217

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Jan 02, 2020

Copy link to clipboard

Copied

I have spent a bit of time trying to figure this out and I'm not getting too far.

 

I went back to 2017 and added a button for a web skin that worked exactly as you want. It opened my site in the topic area.

 

What appears to be the same method in 2019 doesn't work at all. That made me wonder if you are using 2019 Classic or 2019 New UI as asked earlier?

 

Please clarify what you are using and exactly how you are getting it to open the target, albeit not as you want.


www.grainge.org

Please use the blue Reply button rather than the black text Reply to keep posts in time order. It helps.
See www.grainge.org for free RoboHelp and Authoring Information.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Jan 02, 2020

Copy link to clipboard

Copied

Sure,

I'm using the new 2019 UI. The steps I've taken are:

1. Edit the Azure_Blue Skin

2.Under 'Custom Buttons' add new button and icon

3. Under 'Link' I add the url

 

That successfully adds a button that links to the external site in a new window. This functionality works for our purposes in terms of sending the user to the desired page. Being the problem solving troubleshooter that I am, I am wanting to solve the mystery of how to make the topic window the target for the link. I still think there must be JavaScript code that can do that.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Jan 02, 2020

Copy link to clipboard

Copied

Interesting. That's exactly what I did and it would not open anything. I added http://www.grainge.org and nothing happens when I click the button. I'll try some more tomorrow.

 

That method works in Classic without any javascript and opens my site in the topic area without needing to use an iFrame.


www.grainge.org

Please use the blue Reply button rather than the black text Reply to keep posts in time order. It helps.
See www.grainge.org for free RoboHelp and Authoring Information.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Community Beginner ,
Jan 02, 2020

Copy link to clipboard

Copied

Hi Peter,

Selecting the appropriate button and then adding the URL in ‘GENERAL’ ==> ‘Link’ is working fine and opens the given URL in new tab. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Community Beginner ,
Jan 02, 2020

Copy link to clipboard

Copied

Hi mariaj46098905,
Please follow the below steps to open the desired URL in the same window as the topic: 

  1. Under 'Custom Buttons' add new button and icon.
  2. Select the new button to change its properties.
  3. Under ‘JAVASCRPIT’ ==> ‘OnClick’ add the JavaScript Code: window.open("https://google.com","_self")
    Since by default the target is "_blank", the URL is opened in a new tab, changing it to "_self" would open the URL in the same tab.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Jan 03, 2020

Copy link to clipboard

Copied

I tried it and what that does is override the whole Robohelp window thus requiring the user to click the back button to get back to the online manual. The goal is for the target to just be the topic window and not the entire webpage. Painting the picture: I want a button on the toolbar (not the table of contents) that will open a webpage in the topic window allowing the user to access a webpage while still in the Robohelp environment where the skin remains the same with the toolbar on the top and the table of contents on the left.  We have current manuals that were created in previous versions that have this option and I was able to open up Robohelp Classic to see how it was done. The 'button wizard' automatically programmed the button to open the webpage in the topic window.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Community Beginner ,
Jan 03, 2020

Copy link to clipboard

Copied

Hi mariaj46098905, 

I believe that your problem could be solved by changing the "_self" to "rh_default_topic_frame_name". 

  1. Under 'Custom Buttons' add new button and icon.
  2. Select the new button to change its properties.
  3. Under ‘JAVASCRPIT’ ==> ‘OnClick’ add the JavaScript Code: window.open("www.your_url_here.com", "rh_default_topic_frame_name") 
    This should open the specified URL in the topic IFrame.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Jan 03, 2020

Copy link to clipboard

Copied

Maria

 

I was adding the link exactly as you describe and it failed every time. Then I tried another site and it worked. I went back to the first site and that then worked!

 

I tried Sudhanshu1996Monga's script and got the same as you and understand that is not what you want. I have asked Adobe if there is a solution for this version and will post back with whatever they advise.


www.grainge.org

Please use the blue Reply button rather than the black text Reply to keep posts in time order. It helps.
See www.grainge.org for free RoboHelp and Authoring Information.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Jan 04, 2020

Copy link to clipboard

Copied

Maria - The revised script does work but be aware some web sites do not allow their site to be displayed in a frame. In Firefox you would then get a white area but Edge gives the reason.

 

I hit this when I tried www.adobe.com. With my own site it worked fine.


www.grainge.org

Please use the blue Reply button rather than the black text Reply to keep posts in time order. It helps.
See www.grainge.org for free RoboHelp and Authoring Information.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Jan 06, 2020

Copy link to clipboard

Copied

YES!!!! It works. Thank you soooooo much Peter and Sudhanshu1996Monga. At first try it opened the link and it did open the webpage in the topic window but it also opened in a new tab. After removing the web address under 'Link' and clearing chaches it only opened up in the Robohelp program. Thanks again, mystery solved, feeling triumphant 😄

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...