SitePoint Sponsor

User Tag List

Results 1 to 15 of 15
  1. #1
    SitePoint Addict
    Join Date
    Jul 2003
    Location
    Toronto, Ontario
    Posts
    234
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Anchors Don't work in Firefox?

    Hey guys,

    I started a new website a few days ago, with only a few minor problems.

    I made anchors on a sub page, with a link to them form the main page.

    They work fine in IE but the anchors don't seem to work in Firefox.

    Has anyone ever had this issue and maybe knows how to resolve it?

    The website is...

    http://www.psbrushes.net (the latest brushes on the main page, click em )

    Thanks,
    Mario
    $ Available For Hire
    Need a website designed or coded? Then feel free to contact me!

    PSP Backgrounds - PSPBG.net || Photoshop Brushes - PSBrushes.net

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,420
    Mentioned
    160 Post(s)
    Tagged
    1 Thread(s)

    anchor names

    I think it might work better if you take the hash out of the name. eg,
    change
    HTML Code:
    <A name="#000001">
    to
    HTML Code:
    <A name="000001">

  3. #3
    SitePoint Addict
    Join Date
    Jul 2003
    Location
    Toronto, Ontario
    Posts
    234
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey,

    It Worked!!!

    Thanks, will never make that mistake again.

    Mario
    $ Available For Hire
    Need a website designed or coded? Then feel free to contact me!

    PSP Backgrounds - PSPBG.net || Photoshop Brushes - PSBrushes.net

  4. #4
    SitePoint Evangelist gollux's Avatar
    Join Date
    Feb 2005
    Location
    Oregon, USA
    Posts
    414
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One of those cases where IE doesn't follow the standards, you design for IE and it dies in all the other browsers. Another example, according to the standards, class and ID names are case sensitive.
    Released under the Fiasco Labs Digital Damnation Copywright,
    it's yours to make whatever the 7734 you want with it.

    (c) 2005 Fiasco Labs All Wrongs Reserved

  5. #5
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Please note NAME an ID values cannot legally start with a numeric character.

  6. #6
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Robert is right. You need to put a letter (A-Z or a-z) as the first character in the identifier.
    Birnam wood is come to Dunsinane

  7. #7
    SitePoint Addict swaraj_here's Avatar
    Join Date
    Jan 2007
    Location
    India
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To make it working for both IE and firefox, name="" and id="" should be there with same value in anchor tag.

    such as <a name="pageTop" id="pageTop" ></a>

    To call it the link will be <a href="#pageTop">Top of Page</a>

  8. #8
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very аtypical. Your site is working with Internet Explorer and not working with Firefox

  9. #9
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by xhtmlcoder View Post
    Please note NAME an ID values cannot legally start with a numeric character.
    name="" is of type CDATA, not NAME or ID.
    Simon Pieters

  10. #10
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,233
    Mentioned
    47 Post(s)
    Tagged
    1 Thread(s)
    ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").
    <a name="foo">some anchor</a>
    this is not a NAME token?
    Does this rule not hold even though names are cdata?

  11. #11
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://www.w3.org/TR/html401/struct/...ml#adef-name-A points to CDATA, not NAME. Thus it follows that the restrictions for NAME does not apply (just like NUMBER, IDREF etc do not apply).

    In HTML5 name="" is obsolete (you should use id="" instead, can be used on any element).
    Simon Pieters

  12. #12
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,233
    Mentioned
    47 Post(s)
    Tagged
    1 Thread(s)
    So name="" is not the same thing as NAME? And then id = name but not NAME? Bizarre and interesting. They expected regular human beings to read this?

    In HTML5 name="" is obsolete (you should use id="" instead, can be used on any element).
    Man developers haven't used name on anchors since XHTML said it should be removed (was deprecated in 1.1? which people writing 1.0 wanted to emulate wherever possible), which is where I started before moving to HTML4.

  13. #13
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    The main point was within HTML 4.01
    Quote Originally Posted by HTML 4.01 6.2 SGML basic types
    For some HTML 4 attributes with CDATA attribute values, the specification imposes further constraints on the set of legal values for the attribute that may not be expressed by the DTD.
    In either case ID is preferred.

  14. #14
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by xhtmlcoder View Post
    The main point was within HTML 4.01
    For some HTML 4 attributes with CDATA attribute values, the specification imposes further constraints on the set of legal values for the attribute that may not be expressed by the DTD.
    Sure. The further restrictions for name="" is:
    The value of this attribute must be a unique anchor name.
    That doesn't say that non-NAME values are not allowed.

    Anyway, it's academic at this point since the attribute shouldn't be used in the first place, as you say.
    Simon Pieters

  15. #15
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Off Topic:

    My own weird interpretation was; the Anchor NAME is loosely taking the same space as the ID anyway. So if they both happen appear in the anchor then the ID wins the fight and forces the NAME into complicit submission regarding the values.


    Quote Originally Posted by "Simon
    Anyway, it's academic at this point since the attribute shouldn't be used in the first place, as you say.
    True. Case closed.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •