Export to DHTML TOC

This command is available from the File menu in the FAR TOC & Index Editor.

This command takes the existing TOC file (.hhc or .hxT) and creates a dynamic NDOC style TOC (using DHTML and Script). The TOC actually needs to live inside a Frameset file so we create that as well. Once created FAR opens the Frameset file so you can preview the site.

Note: FAR can also import NDOC style HTML TOC files. See TOC & Index Editor > File menu

What is NDOC?

NDOC is very popular with MS Visual Studio programmers. It can take embedded notes from the programmers source code and produce very beautiful documentation. We were so impressed the NDOC DHTML TOC that we wanted to include a way to export FAR TOC files into this format. 

Controls
Target Folder This is the folder that your current TOC lives in. All files will be created in this folder.
Frame Title Text that will be seen in the title bar of Internet Explorer.
Frameset File Enter an HTML file name (no directory) for the HTML Frameset file. This file will be created in the Target Folder. Be careful not to overwrite one of your normal document files. Once created open this file to view the documentation set with TOC.
Contents File Enter an HTML file name (no directory) for the new HTML TOC file. This file will be created in the Target Folder. Be careful not to overwrite one of your normal document files. This file can be viewed alone but works much better when viewed in the Frameset file. The contents file is displayed in the left pane of the frameset.
Default Topic Select an existing file that will initially open in the right pane of the Frameset.
Mini Buttons The three rows of small buttons allow you to Browse for a file, Open a file in a text editor, and View a file in Internet Explorer.
Create DHTML Site Click this button to generate the 2 main files (Frameset and Contents). You will be prompted if a file needs to be overwritten. Once created the Frameset file will open in Internet Explorer.
Compatibility

The TOC uses advanced scripting and CSS. One would assume that a modern browser is required to view the code. Thus if you intend to place this code on the web you may need to add some browser check code and do some browser compatibility testing.

Shipping files

Obviously you need to ship both the Frameset and Contents files with your HTML.

You will also find these other files copied into your project folder. These must also be shipped.

treenodeplus.gif, treenodeminus.gif, treenodedot.gif, tree.css, tree.js

If you already have files that use these names in your project folder then you will have problems.

Acknowledgements

Thanks to the NDoc team for allowing us to ship this feature along with some of their files. Congratulations on a top product.

The TOC code itself was originally written by Jean-Claude Manoli and as requested we have left the copyright notice in the header of the tree.js file. Please do the same. A very nice piece of code.


http://www.helpware.net/