PDA

View Full Version : named anchors not working in Safari



alexmel7
Apr 16th, 2010, 05:45 PM
Hello Everyone, I have a series of images on a portfolio page that have named anchors placed around them. I am trying to link to these anchors from my homepage and this seems to work fine in all browsers that I've tested except for Safari (at least on macs). In Safari, when I click a link on my homepage that should go the anchor on my portfolio page, it just loads the portfolio page without going to the anchor. Here is the site I'm working on where this happens (the scrolling images at the bottom of the homepage are the links to the anchors):

http://wri.eas.cornell.edu/Message_Brand_Advertising_2010/index.html

abduraooft
Apr 17th, 2010, 09:45 AM
I don't see any named anchors in the given page. Or am I missing something?

Hope you are using id attribute to the target elements instead of name attribute.

alexmel7
Apr 19th, 2010, 06:05 PM
Hello abduraooft. Thanks for responding. The anchors are on the portfolio page which is accesed by clicking on any given image at the bottom of the index page. These images are meant to link to specific anchors on the portfolio page. I am using the name attribute. What is the issue with using this instead of the id attribute?

abduraooft
Apr 19th, 2010, 06:26 PM
I am using the name attribute. What is the issue with using this instead of the id attribute? The attribute name is deprecated on most of the html element. By using the id you could target any element in the document with an anchor.

alexmel7
Apr 19th, 2010, 06:51 PM
Ahh. thanks for pointing that out. I will trying switching my name attributes to id attributes and see if that helps.