Community Forums 

Main Content

Problem with anchors in html buttons

    Aug 10 2017 11:15:16



    Join date : 2012-01-24      Posts : 5

    I am using html buy buttons with a return page set up.
    My pages uses anchors such as <a name="section2">...</a> and I am trying to configure the button to have a return attribute that incorporates the anchor so that customers can return to the relevant section of the page.

    my code includes the following:

    rtnpage = pagename+"%23"+section

    <a href="',rtnpage,....

    The intention is to submit:

    However, the return address from the basket is:
    which obviously doesnt work as the #section2 is appearing in the wrong place.

    Any ideas how to get the #section2 anchor to appear with the return page so that it can be interpreted properly by the browser?
    ..or can I stop the ?tp=CONTINUE+SHOPPING from appearing?

    Aug 10 2017 16:54:44



    Join date : 2008-09-18      Posts : 3256

    Having trouble with a form or need one building?
    Fast turnaround, but I do charge :)

    Mal's Forms / Scripts and the syntax are here.

    Aug 15 2017 10:05:20



    Join date : 2012-01-24      Posts : 5

    Thanks. Sorted and working now.
    Incidently, it doesnt work with older versions of Chrome, such as Version 49.0.2623.112 m