6 Replies Latest reply on May 3, 2007 6:44 AM by LaKisha1

    Make Close Window Link Work in WebHelp

    LaKisha1
      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.

        • 1. Re: Make Close Window Link Work in WebHelp
          Linux Rules Level 2
          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
          • 2. Re: Make Close Window Link Work in WebHelp
            LaKisha1 Level 1
            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.
            • 3. Re: Make Close Window Link Work in WebHelp
              Linux Rules Level 2
              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
              • 4. Re: Make Close Window Link Work in WebHelp
                Cro1410 Level 1
                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
                • 5. Re: Make Close Window Link Work in WebHelp
                  LaKisha1 Level 1
                  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. :)
                  • 6. Make Close Window Link Work in WebHelp
                    LaKisha1 Level 1
                    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.