Announcement

Collapse
No announcement yet.

Useless Anchor? (careful how you say that)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Useless Anchor? (careful how you say that)

    I hope a fresh set of eyes / brains can work this small but very annoying problem out for me.

    In my Act_footer.html I have put a graphic at the bottom with a link to an anchor which takes you to the top of the page.
    (the same anchor 'top' is at the top of each template).

    <CENTER><A href="#top"><IMG width="584" src="back.gif" height="22" border="0" alt="Top"></A></CENTER>

    In my act_primary I have the NETQUOTEVAR:FOOTER at the bottom of the template.

    This works as it should, I am getting the graphic where it should be and it links to the top of which ever page you are on.

    My problem is that you cannot use NETQUOTEVAR:FOOTER within any checkout or brochure templates (correct me if I'm wrong but I did try it and it just shows the text 'NETQUOTEVAR:FOOTER' on the generated pages.


    I therefore simply added the same graphic and same link (actually the same line of code as above) to the bottom of by brochure and checkout pages

    The brochure pages work fine but the checkout pages do not link to the top of the page you are currently viewing.

    The link on the picture on the checkout pages has somehow changed to http://www.myurl.co.uk/acatalog/#top

    What is putting the acatalog infront of the top tag?

    I have tried all sorts of things but cannot work this one out.

    #2
    There's probably a basehref at the top of the page. there is at the top of most templates.

    Mike

    Edit: Yup, there it is:

    <BASE HREF="http://www.bargain-shop-online.co.uk/acatalog/">
    -----------------------------------------

    First Tackle - Fly Fishing and Game Angling

    -----------------------------------------

    Comment


      #3
      I have "<Actinic:BASEHREF VALUE="NETQUOTEVAR:BASEHREF"/>"
      in my templates (act_primary, act_brochureprimary, act_primarycheckout) not the act order00,01,02 etc

      Should it be there? should it be altered so that it will show corrrect checkout urls?

      Should I delete this line?, would it affect the pages you are returned to when navigating?


      I have also used this line below in the past, can't remember the reason for it, I think it was so that a patch would work correctly.
      Any idea what it does different?

      <Actinic:BASEHREF VALUE="NETQUOTEVAR:BASEHREF" FORCED=NETQUOTEVAR:BASEHREFFORCED/>

      All help appreciated

      Simon

      Comment


        #4
        tried commenting out/deleting the basehref from my actprimary checkout template but it just makes no images appear or styling show as I suppose the basehref is used to help find the neccesary style sheets and acatalog folder etc.


        How can I get this image and anchor link work on my checkout pages?

        Comment


          #5
          You can't use basic HTMl as it's not an HTML page, but a CGI generated one.

          On the checkout screens, you'll just have to hard code a full link to the page you're already on. e.g.

          http://www.bargain-shop-online.co.uk...l?ACTION=Start

          This will force the CGI script to regenerate the page and will place you at the top again.

          Mike

          PS. You've got a hell of a long timeout on your cart cookies. This morning I still had something there from last night.
          -----------------------------------------

          First Tackle - Fly Fishing and Game Angling

          -----------------------------------------

          Comment


            #6
            Just to update you on my progress and to help anyone else who might be in the same situation.


            I have ended up using this line in my templates:
            <img src="back.gif" width="584" height="22" border="0" alt="Back to top" onClick="GotoAnchor('top')">

            You do still need the anchors in place. (I did so I chose this option).
            Works well even on the checkout pages.


            If you done want to bother with anchors you can use this method:
            <img src="back.gif" width="584" height="22" border="0" alt="Back to top" onClick="java script:window.scrollTo(0,0)">


            Only thing I have noticed with the method I am using is that you do not get the hand when hovering but the normal arrow curser.
            Any idea what the code is to change the hover curser to the hand?

            Comment


              #7
              You can fix the pointer with more JavaScript but it's a lot easier to use an anchor-only href.

              e.g.

              <a href="#top"><img src="back.gif" width="584" height="22" border="0" alt="Back to top"></a>

              And it won't be munged by Actinic.

              Norman
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                Hi Norman,
                I appreciate your reply, I know your a busy man.

                I did have the anchor-only href as you mentioned previously but this causes problems when navigating through to the checkout pages (due to the basehref).

                I did have a mixture of anchor-only href on the act_primary template and then the onClick="GotoAnchor('top')"> on the checkout pages.
                This worked apart from the fact that the 'view cart' page uses the act_primary template and still had problems.

                The only way to get all pages working correctly with a back to top button was to go the route I did.


                Out of curiosity, what would be the JavaScript needed to accomplish the hover hand?

                Many thanks

                Simon


                P.S I've got a question regarding Norcascade but I'll post this separately to avoid confusion on this post.

                Comment


                  #9
                  I guess you could use a style in the style sheet like:
                  .cursertype {
                  cursor: hand;
                  }

                  and then add the class the to graphic line

                  Comment

                  Working...
                  X