Synchronize TOC when viewing topic directly in browser-based

Nothing is perfect! This is where you can post your ideas and wishes for functions you'd like to see in Help & Manual. Current version only please (H&M7).

Moderators: Alexander Halser, Tim Green

Post Reply
brette
Posts: 8
Joined: Wed Aug 28, 2002 6:26 am

Synchronize TOC when viewing topic directly in browser-based

Unread post by brette »

I've managed to build somewhat of a context-help system in my web application. By linking directly to the different help topics from various pages in my web site I can pull up exactly the topic the user would expect.

Even better, the browser-based html is smart and includes JavaScript so that if a topic is ever loaded directly it instead loads the frame set with the TOC on one side and the topic on the other.

The result is when a user clicks on the help icon in the web application he or she gets help about whatever he or she is looking at. Works great!

The only shortcoming is that when linking directly this way although it pulls up the TOC, it doesn't synchronize it with the topic being viewed. If it just did this it would be perfect...
User avatar
Tim Green
Site Admin
Posts: 23157
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Unread post by Tim Green »

This sounds great, Brette! If you have the time I'm sure that lots of users (myself included) would like to read a description of how you do it. If you do write one just post it in Tips & Tricks and if it turns out to be something longer I'll move it to the permanent Tutorials section. :P

Sorry I can't help you on your question -- maybe Alex or someone else will... :roll:
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Alexander Halser
EC-Software Support
Posts: 4098
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Unread post by Alexander Halser »

That's a bug in the current version of our java script. It is meant to work with particular topics when you use this syntax:

http://www.ec-software.com/helphtml/ind ... atsnew.htm
Note the ?whatsnew.htm at the end of the url.

This displays the topic but does not yet synchronize the TOC.
Alexander Halser
Senior Software Architect, EC Software GmbH
Daniel Richli
Posts: 1
Joined: Tue Oct 08, 2002 6:30 pm
Location: Switzerland

Unread post by Daniel Richli »

Superb

I wanted to request this feature and it's already done.

I have studied the Java Script code and I think a solution for synchronizing the navigation tree must be possible.

I will do a lot of links to my HTML manual for referencing topics. For user friendly view the navigation should be synchronized.
brette
Posts: 8
Joined: Wed Aug 28, 2002 6:26 am

Unread post by brette »

Please let me know if you get it figured out. I'd love to use this in my application.
User avatar
Alexander Halser
EC-Software Support
Posts: 4098
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Unread post by Alexander Halser »

For user friendly view the navigation should be synchronized.
We will implement this in version 3.2. As a quick workaround you could patch the javascript after creation. Look in your output folder for a file named help_content.js and open it with a text editor.

Insert the following lines (patch marked with "begin patch" and "end patch"):

Code: Select all

if (currentNumber == "") currentNumber = 

top.location.href.substring(top.location.href.lastIndexOf("?")+1,top.location.href.length);
for (i=0; i<tocTab.length; i++) {
if (tocTab[i][2] == currentNumber && tocTab[i][2] != "") {
currentIndex = i;
//-----------Begin patch--------
currentNumber = tocTab[i][0];
currentNumArray = currentNumber.split(".");
currentLevel = currentNumArray.length-1;
//-----------End patch--------
break;
}
if (tocTab[i][0] == currentNumber) {
currentIndex = i;
break;
Alexander Halser
Senior Software Architect, EC Software GmbH
Post Reply