3 Replies Latest reply on Feb 22, 2007 7:35 AM by

    Dynamic tool bar buttons?

      I'm using RHX5 HTML. We are trying to add a button dynamically to the toolbar, depending on the contents of a querystring. We've decided to always add the button and then we'll hide it depending on the querystring. Is the whtbar.js file that is generated when you publish the webhelp version always the same file? I assume it is and we could make some adjustments to that file and just slide it in replacing the one that's generated. Does anyone know if the file is adjusted on each publish or if it's just the same file every time?

      What I'm thinking here is that I make a modification to that file, specifically to the writeToolbar function in it, and after you recompile the help every time, you just slide in the new version. Simple as pie.

      Any ideas?
        • 1. Re: Dynamic tool bar buttons?
          HKabaker Level 2
          So long as you make no changes in the toolbar in between, you can do as you suggest for this project only.

          If you have another project with a slightly different toolbar, you need to make a different substitute file.

          For example, if you're putting the Search form in the toolbar and change the width of the text entry box, the output file will be different.

          My preference is to alter the newest output file after publishing. If you're not publshing, but copying the !SSL! package directly, you would change the output whtbar.js file in that directory.

          If you can't edit files after publishing, you can publish to another location on your hard drive, make your changes and send the new package to its destination. If you have a convenient way to compare the new output package with the old one,
          you would send only the changed files.

          Here's another chance for me to plug Beyond Compare, a very useful tool in which I have absolutely no financial interest or organizational connection, other than as a user.

          It's easy to find on the Web.


          1 person found this helpful
          • 2. Re: Dynamic tool bar buttons?
            Roger N Level 2
            Or, one could use ReplaceEm to customize the output files after each regeneration.
            1 person found this helpful
            • 3. Re: Dynamic tool bar buttons?
              Thanks for the help. I think I've figured it out. I'll download ReplacEm.