Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #290017

    I am creating a series of sales funnel pages in which the user navigates through a sequence by saying yes or no to an offer, but I want an av_button on each page which says ‘Back’ and which causes the browser to go back a page. I can’t hardwire it the way I can with the ‘Next’ ot ‘Yes’ button, because there are multiple entry points to some pages.

    I’ve found a php snippet as follows, I don’t know whether it works.

    <?php
    $url = htmlspecialchars($_SERVER[‘HTTP_REFERER’]);
    echo “back“;
    ?>

    but how can I create an OnClick event or whatever for the button. It would be handy to have that as a dropdown menu choice.

    Even a way to dynamically set the url would be helpful, by storing the last url to a variable then assigning it etc, not ideal though.

    • This topic was modified 10 years, 5 months ago by twdlewis.
    #290528

    Hi twdlewis!

    I think this thread will help you: http://stackoverflow.com/questions/8067510/onclick-javascript-to-make-browser-go-back-to-previous-page – i.e. try:

    
    <a href="javascript: history.go(-1)" class="button">Back</a>
    

    Best regards,
    Peter

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.