|
|
| |
|
One way to make a table of contents is to use HTML frames to display a table of contents on
the left while displaying your docuument on the right. Our example uses the SwiftView
Technical Reference Manual. Click on a chapter listing and Swift View
will display the desired page by searching for the name of the chapter. A
benefit of the search-for-chapters algorithm is that if the document undergoes changes,
the page numbers are corrected automatically. To
avoid finding the name of chapter listed in the manual's table of contents, the
search is started on page ten. JavaScript generates
a new HTML page for the right frame, resulting in an instance of SwiftView
opened to the desired page. Hyperlinks that trigger this action can be seen in
svtoc_l_search.htm.
When a hyperlink is clicked, it calls the JavaScript searchForString function defined
in svtoc_search.htm.
|
[ Run ] [ View Source: svtoc_search.htm,
svtoc_l_search.htm, svtoc_r_search.htm ]
Up to the Web How-To.
|
|
|
|