• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Make Close Window Link Work in WebHelp

Participant ,
Apr 26, 2007 Apr 26, 2007

Copy link to clipboard

Copied

Attached is code that RoboHelp uses to display a Close button in HTML Help, and also some code that I'm trying to use to display a Close Window link in WebHelp. Can this code be modified and used in WebHelp, or is there some other 'Close Window' code that can be used in WebHelp?

The "Close Window" must be a blue link and not a button.

Views

608

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
community guidelines

correct answers 1 Correct answer

Participant , May 03, 2007 May 03, 2007
Thanks - it definitely works! Thanks to a developer though, I found out that "%20" is just a space, so that part of the code wasn't needed. In case anyone else needs this solution in the future, I've included the 'before' and 'after' below.

Votes

Translate

Translate
Engaged ,
Apr 26, 2007 Apr 26, 2007

Copy link to clipboard

Copied

Hello LaKisha -

A Google search of:
"close window" javascript html
...produced over 230k hits - the first few contain samples of what you seek.

Regards,
GEWB

Votes

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
community guidelines
Participant ,
Apr 27, 2007 Apr 27, 2007

Copy link to clipboard

Copied

Thanks, I'll try that search and take a look at the first few results. The code I currently have works in my Page-level Help (i.e., user clicks Help icon on the page in the system, window opens that displays one HTML page, user clicks Close Window and the window closes); however, in my Site Help which displays the same pages, the Close Window link does not work. I was wondering if it had something to do with the fact that the Site Help window RoboHelp uses has frames and therefore the Close Window link can't close the entire window because of the frames.

Votes

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
community guidelines
Engaged ,
Apr 27, 2007 Apr 27, 2007

Copy link to clipboard

Copied

Hello LaKisha -

Correct about "close" script in the content frame.

In the RH app, do a search on "Show / Hide". Look at and play with the "Hide" scripting - it displays only the content frame (nav and tools not displayed). Write that type of script for the start of your "close" function, then add the window close scripting available all around the Web. That is, your script starts by hiding all but the topic content then runs the window close portion of the script.

I don't remember the RH file name(s). Idea: make a one topic project and enable the Show / Hide function during project gen. Then look at the output files/code.

Regards,
GEWB

Votes

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
community guidelines
Participant ,
May 02, 2007 May 02, 2007

Copy link to clipboard

Copied

LaKisha,
Just add the following javascript on your close button:
javascript:%20top.close();
This will close the containing frames that the page is in.
Chris

Votes

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
community guidelines
Participant ,
May 03, 2007 May 03, 2007

Copy link to clipboard

Copied

Thanks ChrisRousset. I'll try this and mark your reply as the answer after I confirm that it works for the code I'm currently using. 🙂

Votes

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
community guidelines
Participant ,
May 03, 2007 May 03, 2007

Copy link to clipboard

Copied

LATEST
Thanks - it definitely works! Thanks to a developer though, I found out that "%20" is just a space, so that part of the code wasn't needed. In case anyone else needs this solution in the future, I've included the 'before' and 'after' below.

Votes

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
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp