...

View Full Version : Resolved Anchor not supported-> Workaround?



ewingr
11-20-2011, 10:02 PM
I am building a web site in SmugMug, which provides a base web site that you can customize to an extent. The problem I am facing is that they do not support anchors.

I want to be able to link form one page, to an item in the middle of another page. What happens when I create an anchor on the page I want to link to, instead of taking me to the anchor itself in the middle of the page, it just takes me to the top of the page.

Anyone know of a workaround to this problem?

Excavator
11-20-2011, 10:59 PM
Hello ewingr,
I have not messed with SmugMug much (re: not at all) but I would first question how you're writing your anchors. Do you have some example of the code you're using?

ewingr
11-21-2011, 12:16 AM
Hello ewingr,
I have not messed with SmugMug much (re: not at all) but I would first question how you're writing your anchors. Do you have some example of the code you're using?

I understand your thoughts. I followed the instructions and examples from the W3Schools.com site. However, I have validated on their forums that they do not support anchors, but no-one has any idea of a work around.

I am presuming that there is no work around.

alykins
11-21-2011, 12:55 AM
I understand your thoughts. I followed the instructions and examples from the W3Schools.com site. However, I have validated on their forums that they do not support anchors, but no-one has any idea of a work around.

I am presuming that there is no work around.

can we see the code you've written?



which provides a base web site that you can customize to an extent.


Anchors are a core html element restricting users to not be able to use them in real bad idea; maybe there is something else worng that you are not seeing. The code you are using would be better

ewingr
11-21-2011, 02:39 AM
can we see the code you've written?



Anchors are a core html element restricting users to not be able to use them in real bad idea; maybe there is something else worng that you are not seeing. The code you are using would be better

Sure. I certainly may have it wrong. I'll be happy to try any suggestions provided. Here is what I have.

On this page (http://www.shuttermaster.co/Other/Purchasing-Prints/20109727_kVdRfW), I have an anchor:


<div align="center"><font size="3" <a name="Giclee"></a> ><strong> Giclée Canvas and Watercolor Prints </strong></font></div><br>


Then, on this page (http://www.shuttermaster.co/Other/Splits-Page/20147708_NWHBNr), I have this code :


<div class="myText">
<p><br>Make a bold impact with ShutterMaster's wide assortment of Wall Clusters and Splits! Clusters and Splits can be assembled with multiple images, or use a single image across prints for a dramatic mosaic effect. Cluster packages are discounted at 20% less than the individual mounted print prices, and are designed to be hung 1" apart. In order to insure that you get a product that is satisfactory to you, Clusters and Splits can not be ordered via the buy buttons on this site. Please see <a href="http://www.shuttermaster.co/Other/Purchasing-Prints/20109727_kVdRfW#Giclee">this page</a> for detailed ordering information, or you can <a href="%3Ca%20href=" "="" onclick="return false;" class="customContactButton">contact us</a> by e-mail for more information.
</p>

When I click the link on the page right above, it takes me to the other page, but to the top, not to the anchor.

Thanks for any thoughts...

tracknut
11-21-2011, 03:13 AM
You have a missing right bracket (red) and extra one (green) here:


<div align="center"><font size="3"><a name="Giclee"></a> ><strong> Giclée Canvas and Watercolor Prints </strong></font></div><br>


That may make the difference. Also I think modern usage of anchors is to use an ID, not a name for them, for example changing that div to:


<div id="Giclee" align="center">

and omitting the <a name.... entirely.

Then last but not least, here's a summary of the 95 errors (http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.shuttermaster.co%2FOther%2FPurchasing-Prints%2F20109727_kVdRfW) on the page that may or may not impact its functionality...

Dave

Dave

Excavator
11-21-2011, 03:50 AM
This might work with your current method of inline styling -
<font size="3" id="Giclee"> &gt;<strong> Giclée Canvas and Watercolor Prints </strong></font>

I did go look at the SmugMug forums (http://www.dgrin.com/showthread.php?t=210204&highlight=page+anchor) and found a working example (http://jfriend.smugmug.com/Other/Flowers-105-Macro/1326864_43CHPd#62559685_pLQz3):


Click <a href="#takemetoyourleader">here</a> to take me to the end of the text.
takes you to
This is a lot of HTML
<br>
<br>
This is a lot of HTML
<br>
<br>
<br>
The anchor &lt;a name="takemetoyourleader"&gt;&lt;/a&gt; is right here.
<br>
<a name="takemetoyourleader"></a>
</div>

ewingr
11-21-2011, 03:02 PM
You have a missing right bracket (red) and extra one (green) here:


<div align="center"><font size="3"><a name="Giclee"></a> ><strong> Giclée Canvas and Watercolor Prints </strong></font></div><br>


That may make the difference. Also I think modern usage of anchors is to use an ID, not a name for them, for example changing that div to:


<div id="Giclee" align="center">

and omitting the <a name.... entirely.

Then last but not least, here's a summary of the 95 errors (http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.shuttermaster.co%2FOther%2FPurchasing-Prints%2F20109727_kVdRfW) on the page that may or may not impact its functionality...

Dave

Dave

Thanks Dave. I corrected that first error, and it didn't help.

That error list is interesting. I'm thinking that some of it is because of the way this page has to be created, and gets a lot of other code added by SmugMug. Quite a few of those 'errors' are actually in the code that gets pushed in by SmugMug. An unfortunate situation for me is that i am quite new to developing HTML without using a generator. I posted that link to those errors on the SMugMug forum to get some thoughts.


This might work with your current method of inline styling -
<font size="3" id="Giclee"> &gt;<strong> Giclée Canvas and Watercolor Prints </strong></font>

I did go look at the SmugMug forums (http://www.dgrin.com/showthread.php?t=210204&highlight=page+anchor) and found a working example (http://jfriend.smugmug.com/Other/Flowers-105-Macro/1326864_43CHPd#62559685_pLQz3):


Click <a href="#takemetoyourleader">here</a> to take me to the end of the text.
takes you to
This is a lot of HTML
<br>
<br>
This is a lot of HTML
<br>
<br>
<br>
The anchor &lt;a name="takemetoyourleader"&gt;&lt;/a&gt; is right here.
<br>
<a name="takemetoyourleader"></a>
</div>

Turns out you found that on my thread that I posted there last night to try to verify again whether or not they support anchors.

The problem with that code is that it is an anchor to the same page. I am attempting to do one to the middle of a different page. That code results in the same thing I already had: takes me to the other page, but not the anchor.

I've posted back in that thread my results, including the error list posted by tracknut above.

If I come up with an answer, I'll post back here. And if any of you have further suggestions, I'm happy to try them.

Folks...thanks for your input. :D

felgall
11-21-2011, 08:18 PM
The name attribute should no longer be used for providing anchor points to jump to in a web page. Many new browsers no longer support them as the id attribute replaced it for that purpose long ago.

The last browser that didn't support being able to jump to any id within a web page was Netscape 4.

ewingr
11-21-2011, 09:21 PM
The name attribute should no longer be used for providing anchor points to jump to in a web page. Many new browsers no longer support them as the id attribute replaced it for that purpose long ago.

The last browser that didn't support being able to jump to any id within a web page was Netscape 4.

That may very well be. I failed to mention it, but I did change to the suggestion of using ID= per Excavator's suggestion. That meant a change to the anchor on the page I'm linking to, no changes to the link itself.Made zero difference.

I have it that way now. Still searching for answer. Thanks for the suggestions, folks.

ewingr
11-22-2011, 01:10 AM
The code that I'm working with is per entering HTML code in the description of a gallery. The tutorials on the SmugMug Forum say to use "Old Journal" style.

After a few posts back and forth about "this works for me" and I say "it isn't for me", finally one of the guys over there figured it out. Here is what he said:


The difference is that your pages are in the Journal format and Smugmug is EATING the hash tag so it WILL NOT WORK. My pages are Smugmug view and it does seem to work there. This is a limitation of Smugmug's javascript interpretation of hash tags. They are eating your tags so they won't work.

Summary: some Smugmug gallery styles are not compatible with customized anchor navigation.

I was pretty sure it was a limitation of some kind imposed by the methodology on SMugMug, and it was the Old Journal style indicated to use in the Tutorial. (It's always so hard to keep documentation current :eek: )

Currently my code is back to name=, but I"m going to experiment with what has been posted here as the way that it should be done, via ID=

Thanks folks for your replies.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum