html Links created to wrong page

A

atryon

I've got a single-file web page which is comprised of 4 pages and saved
as .mht file. I created a few intra-page links using html fragments. They
work when I use web-preview, and they work for page one, but links that are
intra-page on pages 3 and 4 don't work.
Looking at the link publisher created when it saves the file as a web
page, it's linking the same-page html fragments to a different page (e.g.
when viewing the link on page 4 it will point to page 3 instead) it appears
this is why the links don't work. I've tried deleting the html fragments and
creating them from scratch but that doesn't help. Any guidance would be
appreciated.
 
A

atryon

After further poking and prodding I realized it's not linking them to the
wrong page, it's just that for some reason the links aren't picking up the
header's I created on pages 3 and 4 so it's looking for that section and not
finding it. This is an example of the header:
<h2><a name="Question21"></a></h2>

and the related link:
<a href="#Question21"> Question 2.1 </a>

maybe my html code is off, but I made almost identical headers and
references on page 1 (different names) and those links worked fine.
 
D

DavidF

You didn't say which version of Publisher you are using, but try going to
Tools > Options > Web tab and uncheck the option of using the supporting
folder. With that option checked, Publisher produces an index.htm file plus
an index_files folder by default. All the pages other than your home page
are in the index_files folder, which is probably creating the problem with
your links. Unchecking the option will put all files in the same directory,
which should be fine for a .mht file.

If that doesn't work, you might have to rewrite your links from relative to
absolute...or at least add the index_files folder in the path.

DavidF
 
D

DavidF

That's good news. Thanks for posting back.

For the benefit of all, how did you ultimately change the way you wrote the
links, or set the options in Publisher?

DavidF
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top