Skip to main content
Inspiring
November 2, 2018
Question

DW CS6 Named Anchor edit not working

  • November 2, 2018
  • 3 replies
  • 518 views

I do very little programming. A couple of years ago I used CS6 to create a personal website that had a FAQs page of questions with links to answer pages. Each link had a leading named anchor so when the answer page was displayed it showed all the questions but started at the question line. This week I updated the site with two new pages. I created the same line structure as before -  

<li><a id="civil"></a><a href="faqs_civil.html#civil">Can Civil Action be Brought Against Me?</a></li>

All the original links work properly. The two new links only go to the top of the new page instead of the named anchor on the new page.

Also, after the first creation didn't work I deleted the line and started again. DW said the previous "name" was already used and I had to use "name2". Next time I had to use "name3". Where are these coming from if I delete the original line?

In my search I read something about a Table of Contents and something else about a List of parts(?) but I can't find anything about these in DW.

I'm still using CS6 so Named Anchors are still in my menus and are inserted.

ANSWER - I don't know why, but when I finally gave in and used "name3" it finally worked right. When I used the old "name" for both the anchor and link it didn't work. When I changed the anchor AND link to the new name, it did. WHY?

This issue is solved, but I'm not a programmer and if someone can explain about the name change requirements it would be appreciated.

This topic has been closed for replies.

3 replies

Inspiring
November 3, 2018

Sorry to both BenPleysier and Nancy OShea. Neither of your answers actually deal with the original post.

The code IS there as

<li><a id="civil"></a><a href="faqs_civil.html#civil">Can Civil Action be Brought Against Me?</a></li>

AND as you can see, there is not  "<a name..." in the code.

Even when I delete the above line and remove ALL reference and use of the anchor name totally from the page, if I try to create a new anchor it requires me to use a new name as "civil2".

Let me restate the question.

"Even when the page code has had any previous use of the anchor name deleted and there are no entries anywhere on the page using the previous name,,,

Where does DW find some record of a previous deleted use and why does it use something that has been deleted to force a new name for a new anchor trying to use a previous name."

The question remains unanswered.

Nancy OShea
Community Expert
Community Expert
November 3, 2018

Some things to try:

  • Do a Ctrl+F to Find OLD anchor name. 
  • Hit F5 to refresh the page.
  • Validate code and fix reported errors.
  • Clear your site cache.
    Deleting a corrupted cache file
Nancy O'Shea— Product User & Community Expert
Nancy OShea
Community Expert
Community Expert
November 2, 2018

Named anchors are deprecated in HTML.  We use unique IDs now.

<a href="#Ifoo">Link to foo on same page</a>

<a href="page_name.html#bar">Link to bar on another page</a>

<div id="foo">

     This is the content for foo.

</div>

<div id="bar">

     This is the content for bar.

</div>

Nancy O'Shea— Product User & Community Expert
BenPleysier
Community Expert
Community Expert
November 2, 2018

Because we cannot see the code of your document, I will have a guess and say that you have unsuccessfully tried to use the same anchor names on more than one occasion inside your document. The guidelines state that anchor names must be unique within a document.

Having said that, have a look at HTML a name Attribute which states

Translated, a link pointing to an anchor should look like

<a href="#myanchor">Got to My Anchor</a>

and the anchor will look like

<h3 id="myanchor">This is My Anchor</h3>

Like the 'name' attribute, 'id' must have a unique value within the document.

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!