Previous Page Button / Go Back - Question | JoomShaper
Black Friday sale is live with flat 50% OFF. Sale ends soon! Grab your deal now!

Previous Page Button / Go Back

Ina Holm Johannesen

Ina Holm Johannesen

SP Page Builder 2 years ago

Can anyone tell me how to link a button to go back to previous page?

0
2 Answers
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 years ago #100156

Hi Ernst,

If you don't know previus URL - by default is not possible, becuase you have to put URL.

But you can always use HTML code inside Raw HTML addon, here is example code:

<button onclick="history.back()">Go Back</button>


Yes, supported by all popular browsers.

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 years ago #100159

Preceding your 2nd question about whether the bg color of the button can be different, of course, you can specify it using button class names, for example, Bootstrap 5.x custom button styles:

<button class="btn btn-primary" onclick="history.back()">Go Back</button>

<button class="btn btn-secondary" onclick="history.back()">Go Back</button>

<button class="btn btn-info" onclick="history.back()">Go Back</button>
0