I'm not sure if there is a resolution to this, but here is my issue: My help project contains graphics with captions beneath. The captions have automatic numbering. Occasionally I will link to a caption with "See Figure 4 below....". Now, everything works as it should--the link works, the caption reference is correctly numbered and hyperlinked. However, when you click on the "Figure 4" hyperlink in WebHelp, it does jump to "Figure 4"--but it places the "Figure 4" caption at the top of the browser window, forcing the graphic above it out of view.
My question: Is there a way to make the cross referenced destination appear in the middle or (better yet) the bottom of the browser window?
Thanks.
Carl
Controlling position of cross-ref'd graphic?
-
Centauri27
- Sr. Propeller Head
- Posts: 134
- Joined: Thu Apr 17, 2008 11:30 am
- Location: Vancouver, BC, Canada
Re: Controlling position of cross-ref'd graphic?
Unfortunately, no. It's appearing at the top of the window because you have enough content below the caption that it can scroll the page down to the exact point in the page you wanted to go to. If the caption were the last piece of content on the page, then you'd see the graphic and the caption because you'd already be at the bottom of the scrollbar.
The only workaround would be to put a bookmark on the graphic and create a xref to that bookmark instead of xref-ing to the figure caption. So you'd get to the spot you want, but on the other hand you wouldn't get the figure number as the xref text. So it's a matter of which you'd prefer. The end user would probably prefer the graphic while textually you'd prefer the figure number.
There might be one other workaround, although it would be more labor intensive, if it even worked. You could put an onfocus event in the caption that causes an event when the caption gets focus, as it would when you jumped to it. There might be JavaScript, for example, that redirects the window to the bookmark on the graphic or that scrolls the browser window down x number of pixels. You'd have to do some research to get the script you want and I'd try it on a test project or a copy of your project.
The only workaround would be to put a bookmark on the graphic and create a xref to that bookmark instead of xref-ing to the figure caption. So you'd get to the spot you want, but on the other hand you wouldn't get the figure number as the xref text. So it's a matter of which you'd prefer. The end user would probably prefer the graphic while textually you'd prefer the figure number.
There might be one other workaround, although it would be more labor intensive, if it even worked. You could put an onfocus event in the caption that causes an event when the caption gets focus, as it would when you jumped to it. There might be JavaScript, for example, that redirects the window to the bookmark on the graphic or that scrolls the browser window down x number of pixels. You'd have to do some research to get the script you want and I'd try it on a test project or a copy of your project.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
-
Centauri27
- Sr. Propeller Head
- Posts: 134
- Joined: Thu Apr 17, 2008 11:30 am
- Location: Vancouver, BC, Canada
Re: Controlling position of cross-ref'd graphic?
Thanks, Lisa. That's what I feared. Of course, there is the other workaround: move all the captions above the graphic. This way, it's guaranteed that the graphic will be invisible. However, this also means re-captioning hundreds of graphics...
I think I'll just leave things the way they are and force the user to do some back-scrolling for those rare times I cross-ref to a graphic. I don't want to mess around with Javascript and on-focus events--the extra complexity is just asking for trouble.
Carl
I think I'll just leave things the way they are and force the user to do some back-scrolling for those rare times I cross-ref to a graphic. I don't want to mess around with Javascript and on-focus events--the extra complexity is just asking for trouble.
Carl
Re: Controlling position of cross-ref'd graphic?
Submit a feature request at http://www.madcapsoftware.com/bugs/submit.aspx. I don't know if they'll do anything, since it's doing exactly what it's supposed to do, but maybe MadCap could create a new feature that would do what I described with the onfocus event. Couldn't hurt to ask.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.