Forum Moderators: mack

Message Too Old, No Replies

Dreamweaver link checker and .html#namedanchor

Why does the link checker flag every #namedanchor as a broken link?

         

yellowbeetle

3:31 pm on Aug 2, 2006 (gmt 0)

10+ Year Member



Newbie here - Using Dreamweaver to design a site, some links go to particular page spots (leadersleeve.html#double). Dreamweaver throws all such references into the "bad links" list when I run the sitewide link checker.

Why won't Dreamweaver recognize these links as valid? Thanks very much for any help/guidance.

coopster

6:33 pm on Aug 2, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, yellowbeetle.

Sorry for the obvious question, but do you indeed have named anchors set in the documents?

yellowbeetle

6:13 pm on Aug 3, 2006 (gmt 0)

10+ Year Member



Yep, named anchors have been named, and function properly in browsers - it's only Dreamweaver that gets bothered by it.

coopster

9:45 pm on Aug 3, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You don't have the anchor named twice in the same document, do you?

yellowbeetle

7:54 pm on Aug 4, 2006 (gmt 0)

10+ Year Member



Each "anchor name" only points to one spot.
Here's the syntax of the naming:
<a id="singlebarrelled"></a><img src="../resources/images/products/sleevesinglesm.jpg">Single Barrel Sleeves

Here's the call:
<a href="leadersleeves.html#singlebarrelled">1</a>

jessejump

8:02 pm on Aug 4, 2006 (gmt 0)

10+ Year Member



Try putting a on-breaking space or some character in the anchor.

yellowbeetle

8:23 pm on Aug 4, 2006 (gmt 0)

10+ Year Member



Added an &nbsp; - still kicks up as "broken link"

coopster

9:31 pm on Aug 4, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



It's probably the document type definition and DW is looking for a name attribute as opposed to id type anchor -- try adding a name attribute

<a name="singlebarrelled" id="singlebarrelled"></a><img src="../resources/images/products/sleevesinglesm.jpg">Single Barrel Sleeves

Why are you not wrapping the <a> element around that <img> and it's text? Seems more logical to me.

yellowbeetle

1:42 pm on Aug 7, 2006 (gmt 0)

10+ Year Member



Hooray - adding "name" made Dreamweaver happy!

(Wouldn't wrapping the <a></a> around the <img> and text activate link behaviors so it would appear that the text was a link that went somewhere instead of just an arrival spot?)

coopster

3:44 pm on Aug 7, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Nope, that's what the href attribute does for the <a> attribute. Don't supply the href attribute and you don't have a link.