1 Reply Latest reply on Sep 26, 2006 4:22 AM by MergeThis

    Close secondary window in HTML Help

    geekgal
      I have just converted a Help system into HTML Help. The WinHelp system had secondary windows and the product manager wants to retain the secondary windows in HTML Help, much to my protest. Anyway, I have been able to successfully set links to and from secondary windows using Rick Stone's procedures on Robowizard.com, but am struggling with getting the secondary window to close when focus goes away from the secondary window.

      I found the following on Char's site regarding this:

      Here is where the magic happens. Create a hyperlink that will invoke BOTH the Related Topics control AND the Close Window control. The hyperlink properties should be inserted as follows:
      JavaScript:CloseWindow.Click();RelatedTopics.Click()
      NOTE: You must type CloseWindow.Click() before RelatedTopics.Click(). If you reverse these steps, the entire Help system closes instead of closing only the secondary window.

      However, when I put in this code, I receive a message:
      "An error has occurred in the script on this page."
      Error: 'CloseWindow' is undefined

      I'm not sure what I need to do get this to work. Any help is appreciated. Should I create another hidden related topics control for the CloseWindow command? I really do not want to use a close button - I need the window to close as soon as the user clicks to another window.

      BTW, this is a modular help system with links to and from other projects. All windows are defined with "$global_" as per Rick's instructions.
      TIA
      Janet