Back buttons

  • 15 February 2011
  • 7 replies
  • 15 views

Is there a quick way to have a button send the user BACK to the page they were on before they hit the landing page?


7 replies

And as a note, I’d like this button to live on the form confirmation dialogue, but even having this on the page itself would be useful.

Hey Derek - really sorry about the delay getting back to you here. Your best option is to make a button that has the text “#back” as the link, and then paste this in the Scripts section (place in the ‘Head’)

\<script\>  
jQuery(function() {  
jQuery("a.lp-pom-button[href='#back']").click(function() {  
history.go(-1);  
return false;  
});  
});  
\</script\>  

Let me know if that works!

Thanks Carter…it’s not working…I put the script in Head, linked button to ‘#back’, and placed a link TO the page here: http://team.20sb.net/4lc/ - the page with back button is http://unbouncepages.com/fourleafclot…

ahh sorry I made a pretty dumb mistake there – 'javascript:go(-1)" should actually be “history.go(-1)”. I’ve made the change above, so try copying and pasting the script again.

Thanks man! Listen I have an email from you via Oli about recording the page a vistor came from, and we haven’t been able to figure it out…could I shoot it over to you with our confusion, or would you want to have it up here as a resource?

Badge

Jumping in on a super old thread. Hope @Carter or someone else is still monitoring??

How can I add this same functionality to a text link?

Thanks in advance!

Hey everyone! I’ve been fiddling with the original code of this post to no avail. I’m not a developer but I was able to get a back button functioning on a test page using the HTML script here: https://www.w3schools.com/jsref/met_his_back.asp

If it’s your first time working with HTML in Unbounce there’s some documentation here: https://documentation.unbounce.com/hc/en-us/articles/360034877112-How-Do-I-Embed-Custom-HTML-or-Widgets-into-a-Landing-Page-

Initially, the style won’t look great as it’s a very basic HTML but the same site W3 schools has tutorials on button styling to help you integrate the option.

Reply