This content has been marked as final. Show 8 replies
Unless someone has resolved this recently, this is the way it works when you have TOC synch turned on and the TOC is longer than the height of the frame.
I spent some time looking, without success, for the code that RH uses when it reloads the TOC, searches for the topic to highlight and sets the highlight flag. Why doesn't it scroll the TOC after that?
Depending on how you generated WebHelp (DHTML, Java Applet), the TOC list may be split into two or more files and RH assembles it on the fly. Maybe this prevents the TOC from scrolling down to the highlighted topic.
When you tell some doctors your arm hurts when you raise it "like this," the doctor tells you to stop raising it "like this."
If Adobe will accept this as a "bug," there's some hope.
Coincidentally, earlier today Compeat01 posted a fix in another thread, "TOC not refocusing ..." that may help you.
Not exaclty the same problem, but you might try.
Harvey, I know I can always count on you to come up with something to try. It may be a few days before I can get back to this, but I'll post back to let you know if it helped. Thanks for the suggestion!
I had the same problem, with a book with a large laundry list of topics that the vertical height of the window didn't accomodate. Scrolling down to a topic that was previously out of view and clicking it, the TOC would refresh in such a way that you couldn't see the highlighted topic.
See what snippet #49 on Peter's site does for you.
The summary: edit whthost.js, find document.body.scrollTop=nNewScroll; and comment it out by putting two forward slashes // in front of the line. That worked for me. You can check out the snippet for more details.
edit: "snippet", not "snipped".
Fantastic! Snippet #49 alone did not fix the problem, but, when I combined it with Snippet #1, Rick Stone's Update 8, it worked like a charm. I chose the Local PC option, re-generated, deleted the offending line in whthost.js, and the TOC now works properly.
If only there was a way to retain the whthost.js change from one generate to another, this would be a happy day, indeed.
Thanks to you and Harvey, and to Peter and Rick for having so many helpful ideas. Have a great weekend, everybody!
Have you tried placing the modified whthost.js file in the following location?
C:\Program Files\RoboHelp Office\RoboHTML\WebHelp5Ext\template_stock
*NOTE: You should probably make a backup copy of the existing one first.
I'm thinking if you replaced that one, it is a "seed" and should then propagate to any project you later generate.
Cool, glad you have it working like you want, robowriter.
Saving the "corrected" version of your file to another directory, generating your project, and then copying it into the generated folder, is one option I'll use for most files.
For another option, you could use ReplaceEm.
Generate your project, and then have ReplaceEm sniff specifically in whthost.js, search for the text document.body.scrollTop=nNewScroll;, and have it replace it with //document.body.scrollTop=nNewScroll; (or with nothing if deleting the line worked for you).
Rick, that sounded like such a good idea--I didn't know about ..\template_stock. Unfortunately, I tried it, and the file was still generated with the offending line--I even tried deleting the line, but it came back, anyway.
Nonetheless, I still have a working TOC, and I'm very happy--ends my week on a positive note!
Thanks to everyone who responded. This is the best forum ever (believe me--I've tried Microsoft's forum, and nobody responds!)