Just Write Click

Technical writing with Continuous Integration and docs-as-code

  • JustWriteClick
  • Contact
  • Books by Anne Gentle
  • Introducing Docs Like Code
You are here: Home / techpubs / Author-it Table Of Contents expansion

January 15, 2009 by annegentle

Author-it Table Of Contents expansion

Author-it Table Of Contents expansion

My co-worker Melissa Burpo (yep, I interviewed her before she was my co-worker) has solved a nagging problem with the HTML output from Author-it. The Table of Contents would always lose your place when you expanded one of the TOC items – instead of “keeping your place” vertically, it scrolls your view to the top of the frame. We have a long table of contents and this particular implementation got a lot of complaints.

Rather than shorten our Table of Contents (I would guess that’s what most shops have done), Melissa used Javascript to capture the scroll location, save the location using a cookie, and then reload the scroll location after you expand or contract the Table of Contents.

She’s allowing me to publish her solution here – let us know if you find it useful! You can see it in action at docs.imis.com.

Inserting code into your Author-it Table of Contents

Download the toc_scroll.js file supplied here and save it to your HTML Templates directory, such as C:\Program Files\AuthorIT V4\Data\Templates\Plain HTML\.

Open the toc_template.htm file supplied with your Author-it installation in C:\Program Files\AuthorIT V4\Data\Templates\Plain HTML\.

In the <head> area, insert a pointer to the toc_scroll.js file using this code:
scriptcall
In the next few lines of the toc_template.htm file, give the starting point for the scrolling to load.

functioncall

Modify your book so that it includes the new toc_scroll.js file and the new toc_template.htm file.

Publish your book using these modifications.

We’ve tried it on Windows XP and Vista, IE 7 and 6 and Firefox 2 and 3. Let us know your thoughts on this “fix” for a scrolling annoyance, and if you use it, give a hollah!

Related

Filed Under: techpubs, tools Tagged With: author-it, AuthorIT, cookie, Javascript, scroll, table of contents

More reading

Bubble graph showing sources of developer support data

I’ve been thinking a lot about developer support at Cisco recently, especially for the way the world works today with multiple cloud providers. This post is a re-publish of my talk from over five years ago, but the techniques and tools for listening and helping others are still true today. At Rackspace, we watched several […]

Cisco DevNet is our developer program for outreach, education, and tools for developers at Cisco. From the beginning, the team has had a vision for how to run a developer program. Customers are first, and the team implements what Cisco customers need for automation, configuration, and deployment of our various offerings. Plus, the DevNet team […]

I had a great talk with Ellis Pratt of Cherryleaf Technical Writing consulting last week. Here are the show notes, full of links to all the topics we covered. Podcasts are great fun to listen to and participate in, if a bit nerve-wracking to think on your feet and make sure you answer questions succinctly […]

At the beginning of this year, I worked hard to summarize my thoughts on API documentation, continuous publishing, and technical accuracy for developer documentation. The result is an article on InfoQ.com, edited by Deepak Nadig, who also was forward-thinking in having me speak to a few teams at Intuit about API documentation coupled with code. Always […]

Recently on Just Write Click

  • A Flight of Static Site Generators: Sampling the Best for Documentation
  • Try a GPT about “Docs Like Code” to ask questions
  • Discipline and Diplomacy: Docs in the Open
  • Let’s Find Out: When Do Static Site Generators Do Rendering?
  • GitHub for Managing Tech Docs

Just Write Click in your Inbox

Enter your email address to subscribe to Just Write Click and receive notifications of new posts by email.

Read More

  • Privacy Policy
  • About Anne Gentle, developer experience expert
  • Books by Anne Gentle
    • Conversation and Community
    • Docs Like Code, a Book for Developers and Tech Writers
  • Woman in Tech Speaker Profile
  • Contact

Books

  • JustWriteClick
  • Contact
  • Books by Anne Gentle
  • Introducing Docs Like Code

Copyright © 2025 · WordPress · Log in