Loading ...
Sorry, an error occurred while loading the content.

Link to Bookmark Opens Page Unexpectedly

Expand Messages
  • Ray Shapp
    To All, MSIE v9.0 and Firefox v12.0 both open one of my web pages slightly above the location of an embedded anchor. The link is:
    Message 1 of 8 , May 17, 2012
    View Source
    • 0 Attachment
      To All,

      MSIE v9.0 and Firefox v12.0 both open one of my web pages slightly above
      the location of an embedded anchor.

      The link is:

      http://asterism.org/events/events01.htm#starparty2012-05-19


      In both browsers, the page opens about nine lines above the line where the
      anchor is embedded. That's acceptable, but I'm wondering if that's normal
      behavior. IOW are the browsers showing me a bit of the page above the
      anchor so as to show me the context, or is this happening because I've
      embedded a third-party calendar at the top of the page.

      Did I code the embedded bookmark incorrectly or am I addressing it
      incorrectly? Or is there some other issue I'm missing?

      Thank you for your help.

      Ray Shapp


      [Non-text portions of this message have been removed]
    • Greg Chapman
      Hi Ray, ... Not from where I look. The anchor (duplicated!) is above the table. Why not add an ID to the appropriate table row rather than use an anchor:
      Message 2 of 8 , May 17, 2012
      View Source
      • 0 Attachment
        Hi Ray,

        On 18 May 12 00:02 Ray Shapp <rayshapp@...> said:
        > The link is:
        >
        > http://asterism.org/events/events01.htm#starparty2012-05-19
        >
        >
        > In both browsers, the page opens about nine lines above the line
        > where the anchor is embedded.

        Not from where I look. The anchor (duplicated!) is above the table.

        Why not add an ID to the appropriate table row rather than use an
        anchor:

        <tr id="starparty2012-05-19">

        Greg
      • Marcelo Bastos
        ... Well, first thing thing to try is to validate the page. And... ... http://validator.w3.org throws an error PRECISELY on your anchor: Validation Output: 1
        Message 3 of 8 , May 17, 2012
        View Source
        • 0 Attachment
          Interviewed by CNN on 17/05/2012 20:02, Ray Shapp told the world:
          > To All,
          >
          > MSIE v9.0 and Firefox v12.0 both open one of my web pages slightly above
          > the location of an embedded anchor.
          >
          > The link is:
          >
          > http://asterism.org/events/events01.htm#starparty2012-05-19
          >
          >
          > In both browsers, the page opens about nine lines above the line where the
          > anchor is embedded. That's acceptable, but I'm wondering if that's normal
          > behavior. IOW are the browsers showing me a bit of the page above the
          > anchor so as to show me the context, or is this happening because I've
          > embedded a third-party calendar at the top of the page.
          >
          > Did I code the embedded bookmark incorrectly or am I addressing it
          > incorrectly? Or is there some other issue I'm missing?
          >
          >
          Well, first thing thing to try is to validate the page. And...

          ... http://validator.w3.org throws an error PRECISELY on your anchor:


          Validation Output: 1 Error

          Error /Line 75, Column 30/: document type does not allow element "A" here

          |<a name="starparty2012-05-19"*>*</a>|

          ✉ <http://validator.w3.org/feedback.html?uri=;errmsg_id=64#errormsg>

          The element named above was found in a context where it is not allowed.
          This could mean that you have incorrectly nested elements -- such as a
          "style" element in the "body" section instead of inside "head" -- or two
          elements that overlap (which is not allowed).


          Furthermore, you have the SAME anchor repeated ABOVE the "Solar Viewing
          at Trailside." Look for the line:

          <a name="starparty2012-05-19" id="starparty2012-05-19"></a>

          Which is exactly where the browsers are opening the link. That is, they are looking for the first occurrence of the anchor, and finding it there.

          As a general guideline, <a name="..."> anchors are something to wean oneself off. Try using 'id="..."' for anchors, they tend to be much more versatile.


          --

          MCBastos

          This message has been protected with the 2ROT13 algorithm. Unauthorized
          use will be prosecuted under the DMCA.

          --
          MCBastos

          This message has been protected with the 2ROT13 algorithm. Unauthorized use will be prosecuted under the DMCA.
        • Axel Berger
          ... In principle yes, in practice I do just the opposite, but that s because backwards compatibilty to even the oldest browsers without loss of main content is
          Message 4 of 8 , May 17, 2012
          View Source
          • 0 Attachment
            Marcelo Bastos wrote:
            > As a general guideline, <a name="..."> anchors are something
            > to wean oneself off. Try using 'id="..."' for anchors, they
            > tend to be much more versatile.

            In principle yes, in practice I do just the opposite, but that's because
            backwards compatibilty to even the oldest browsers without loss of main
            content is important to me. If you don't mind Netscape 4 not finding the
            ancor, ID is fine.

            Axel

            --
            Dipl.-Ing. F. Axel Berger Tel: +49/ 2174/ 7439 07
            Johann-Häck-Str. 14 Fax: +49/ 2174/ 7439 68
            D-51519 Odenthal-Heide eMail: Axel-Berger@...
            Deutschland (Germany) http://berger-odenthal.de
          • Greg Chapman
            Hi Axel, ... I take it the audience for your site is a computing museum. That browser must be getting on for 20 years old. The principle of backwards
            Message 5 of 8 , May 17, 2012
            View Source
            • 0 Attachment
              Hi Axel,

              On 18 May 12 00:46 Axel Berger <Axel-Berger@...> said:
              > If you don't mind Netscape 4 not finding the
              > ancor, ID is fine.

              I take it the audience for your site is a computing museum. That
              browser must be getting on for 20 years old.

              The principle of backwards compatibility is fair enough, but in the
              real world there comes a point when it's time to move on. Do you keep
              a sabre-toothed tiger chained up in your back yard to keep the wooly
              mamoths away? No doubt you'll tell me it's very effective as you have
              seen any mamoths near your house since you got the tiger.

              :-)

              Greg
            • Axel Berger
              ... I d like to contradict heatedly, but in this case you re probably right - page anchors are not essential and breaking them is merely inconvenient, not
              Message 6 of 8 , May 17, 2012
              View Source
              • 0 Attachment
                Greg Chapman wrote:
                > but in the
                > real world there comes a point when it's time to move on.

                I'd like to contradict heatedly, but in this case you're probably right
                - page anchors are not essential and breaking them is merely
                inconvenient, not disabling.

                Still, as I use Netscape 4.8 for writing this post and won't change
                anytime soon, and as long as Netscape 4.8 is my standard test
                environment for no script, no CSS, no graphics, I won't stop catering
                for it in my own pages.

                > as you have
                > seen any mamoths near your house since you got the tiger.

                Haven't had a decent mammoth steak in ages. It's got so bad, I don't
                even keep hafted Levallois points in readiness any more. But I read that
                for delicate surgery ceramic knives make a comeback and I believe in
                special cases flint or obsidian is preferable to synthetic ceramics.

                Axel
              • Greg Chapman
                Hi Axel, ... In that case I understand. I d probably still use Lynx for that purpose! Greg
                Message 7 of 8 , May 18, 2012
                View Source
                • 0 Attachment
                  Hi Axel,

                  On 18 May 12 03:20 Axel Berger <Axel-Berger@...> said:
                  > Still, as I use Netscape 4.8 for writing this post and won't change
                  > anytime soon, and as long as Netscape 4.8 is my standard test
                  > environment for no script, no CSS, no graphics, I won't stop
                  > catering for it in my own pages.

                  In that case I understand. I'd probably still use Lynx for that
                  purpose!

                  Greg
                • Ray Shapp
                  Hi Greg, Axel, and Marcelo, Greg and Axel, you break me up! Marcelo, I thought I did validate the page. When I view source in Firefox, I see an HTML Validator
                  Message 8 of 8 , May 18, 2012
                  View Source
                  • 0 Attachment
                    Hi Greg, Axel, and Marcelo,

                    Greg and Axel, you break me up!

                    Marcelo, I thought I did validate the page. When I view source in Firefox,
                    I see an HTML Validator screen that shows 0 errors and 0 warnings. Maybe I
                    tweaked the page after I validated it.

                    Bottom line: With your help (along with a good laugh), I'm now using ID in
                    the table row, and the link behaves as expected, but not tested in any of
                    last century's browsers.

                    Many thanks!

                    Ray Shapp


                    On Thu, May 17, 2012 at 7:19 PM, Greg Chapman <gregchapmanuk@...>wrote:

                    > **
                    >
                    >
                    > Hi Ray,
                    >
                    >
                    > On 18 May 12 00:02 Ray Shapp <rayshapp@...> said:
                    > > The link is:
                    > >
                    > > http://asterism.org/events/events01.htm#starparty2012-05-19
                    > >
                    > >
                    > > In both browsers, the page opens about nine lines above the line
                    > > where the anchor is embedded.
                    >
                    > Not from where I look. The anchor (duplicated!) is above the table.
                    >
                    > Why not add an ID to the appropriate table row rather than use an
                    > anchor:
                    >
                    > <tr id="starparty2012-05-19">
                    >
                    > Greg
                    >
                    > __.
                    >


                    [Non-text portions of this message have been removed]
                  Your message has been successfully submitted and would be delivered to recipients shortly.