• I have used a command for adding Back Buttons to my webpages. It functions good until I’m going back for making corrections to my text – then it changes into something that doesn’t work.

    I have tried several other options for Back Button commands also, from suggestions in this forum, but none of them work. I have 2,000 webpages and are making corrections every day. It goes without saying that I’m tired of having to go into the Text Modus for removing the not functioning command and add the right one every time I’m doing corrections to the texts – it’s double work.

    Could anyone please give me a solution for a Back Button that works?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi strofe, I searched “how to implement back button in javascript” and found this suggestion in w3schools, which is a very reliable site.

    I haven’t tried it, but it looks like exactly what you need with the minimum amount of code. If this suggestion is something you have tried before, maybe you can try summarizing what has and hasn’t worked.

    BTW this is a general web development question, not really a wordpress issue. You will have more success getting this type of question is more appropriate on the stackoverflow.com website.

    Thread Starter strofe

    (@strofe)

    Thank you. No, that command doesn’t work either. I had tried it before:

    <button onclick="goBack()">Go Back</button>
    
    <script>
     function goBack() {
         window.history.back();
     }
    </script>

    These are the other commands I have tried, but which don’t work:

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

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

    <a href="javascript:history.go(-1)" onMouseOver="self.status=document.referrer;return true">Go Back</a>

    <input type="button" value="Previous Page" onclick="goBack()">
    
    <script>
    function goBack() {
    window.history.back()
    }
    </script>
    Jon (Kenshino)

    (@kenshino)

    Lord Jon

    Why do you want a back command?

    Explain your purpose so we can help you matter.

    From what I’m understanding at what you’re actually doing, generally inserting Javascript into the editor is a bad choice.

    Thread Starter strofe

    (@strofe)

    I have a website consisting of 2000 pages and want a “back” command for going back to a recently visited page on that website. I thought that was a very common feature of a lot of websites that have more than one page.

    It seems like Javascript is a bad choice, yes. At least, the Javascript command I’m using doesn’t work.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Back button disappears’ is closed to new replies.