5 Replies Latest reply on Jun 30, 2009 5:01 PM by Captiv8r

    Possible to use custom JavaScript in master pages?


      Hello all,


      I'm working on a WebHelp project using RH8. I'm trying to insert some JavaScript code into a master page so that the script will apply to all help topics that use the master page, but I'm running into problems.


      To add the code, I'm opening the master page and switching to RH's HTML Editor. Form there, I'm pasting the code into the proper locations as described by my developers:


      • onload="getData()"
        (Inserted inside the opening BODY tag)
      • <script type="text/javascript" src="script.js"></script>
        (Inserted between the HEAD tags)


      The problem occurs when I generate the WebHelp layout. When I view the source of the generated topics, the lines I inserted are nowhere to be found. RoboHelp seems to be deleting them.


      Am I doing something wrong? Or is it just not possible to use master pages in this way? If anyone has any ideas, I'd appreciate your input.


      I realize I can accomplish this using a search-and-replace operation on the generated help topics. But for various reasons, I'd rather find a way to do this using the master page if possible.