I have some links internal to the document, in a Table Of Contents at the top. When I click on one of the highlighted section titles, it should go to that section in the same document. I have tried three solutions, but none of them work. My anchors in the body of the document are named with a short form of the section title, with no "#" at front.
(I'm converting the HTML document to PDF. In the PDF document, _external_ links work okay.)
(1) <a href="#secTitle">Section Title in TOC</a>
TOC gives a little jump.
(2) <a href="fileName.pdf#sectTitle">Section Title in TOC</a>
Nothing.
(3) <a href="files/theme/fileName.pdf#sectionTitle">Section Title in TOC</a>
The webhost (Weebly) gives me a light blue screen with "Bye!" on it.
When I open the box for "Link Properties" of the TOC item, the ballot box for "URL is relative to page location" is already checked. That looks correct; when I uncheck it, the address refers to a file on my computer ("file:///c:/..."), which I don't want when I upload.
Suggestions?
I didn't see that one link leads to a PDF. It's supposed to work. Haven't tried in many a year, but I never got it to work when I did.
https://helpx.adobe.com/acrobat/kb/link-html-pdf-page-acrobat.html
Didn't see the bit about the little jump either. Good Christian caught it.
I don't find a good example now, but if you go for instance here http://htmlhelp.com/tools/widgets/#license , you can see that the License topic doesn't scroll to the top because there isn't enough page left for it to do that. For that reason it will under most circumstances look the same as http://htmlhelp.com/tools/widgets/#issues and http://htmlhelp.com/tools/widgets/#acknowledgements .
Okay, pandy (#2), here's the link in the Table Of Contents:
<a href="#form">
<big><big><span style="font-weight: bold;">
2. Variations of form.</span>
</big></big></a>
"#form"—to say the target is "form"—is the reduced version of the section title
"2. Variations of form." Seems to me this should be enough, and the name of the document—
"quesera2.html" while I edit it, "quesera.pdf" after I convert it—
should be taken for granted by default.
But still I've tried it with "quesera.pdf/#form" just in case there could be any doubt.*
I use ".pdf" instead of ".html" because that's what it will need on the site.
And here's the designation of the target at the beginning of the section "2. Variations of form." itself:
<span style="font-weight: bold;">
<a name="form"></a>
2. Variations of form.
</span>
* And Weebly seems to need "files/theme/" before a filename, so I've tried that too, with no result.
I will follow your links (#4) and see what they offer.
Thx
-----------------------
Oops! I've just looked at the HTML version of "quesera.html" _offline_, and the internal links work perfectly.
But _online_ those internal links—in the HTML version—don't work.
Looks alright. There are better ways of doing it, but I guess you don't edit manually and this should work.
So, is the target just under the link or close to the bottom of the page?
I do edit HTML code directly, but with great care and trepidation.
The 23 targets are distributed throughout the document, at all distances from the TOC.
The small jump is an insignificant jitter: the text jumps up a line and back to its original position, if I remember correctly.
Well, then I don't think we can help without seeing the whole thing. Do you have it on the web?
If you want to edit it, you don't need an A tag for the target at all, and especially not an empty one. You can use id as well as name (in fact you should, name is antiquated). And you can add an id attribute to any tag.
So you could do it like this.
The problem got solved several weeks ago. Sorry, I don't remember how.
Thanks for your input.
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)