reggie1570047689 Posted December 12, 2012 Share Posted December 12, 2012 Quite simply I need to add a 'back' button in Qubert so that users can return to the previous page.I don't write code but am happy to copy and paste any code you may suggest to a wherever it needs to go. Many thanks Link to comment
foleyatwork Posted December 12, 2012 Share Posted December 12, 2012 Here's a good post on CSS-Tricks about adding a back button to a page. http://css-tricks.com/snippets/javascript/go-back-button/ As Chris points out, browsers have back buttons so this isn't necessary usually. But if you need to get it done, this code sample from the post will do the trick. <input type="button" value="Go Back From Whence You Came!" onclick="history.back(-1)" /> Developer Evangelist at Squarespace. Link to comment
reggie1570047689 Posted December 12, 2012 Author Share Posted December 12, 2012 Thank you for that, I know what you mean - who would need a back button? - but I have a slightly odd set-up. Link to comment
foleyatwork Posted December 12, 2012 Share Posted December 12, 2012 No worries. There are always exceptions to any rule. If it works for your site, it works for your site. Developer Evangelist at Squarespace. Link to comment
ycheng Posted January 10, 2013 Share Posted January 10, 2013 I am also in need of a back button for each of my "pages" of my work. Please see this page as a referencehttp://www.yaochengdesign.com/art-prints/waves I tried the code but I didn't know where to place it (header? footer?) since I need it in multiple places. Also, if I want to use my own image for the back button, where I do write that in the code? Thanks! Link to comment
Searylis Posted January 11, 2013 Share Posted January 11, 2013 I assume you would have to put it into a Code-Block somewhere on your page. Link to comment
davidbkopp Posted August 12, 2015 Share Posted August 12, 2015 The code posted by foleyatwork is good. Here's some more information thought ... If you're using an <a> tag remember that the href attribute will cause Safari and Firefox (and maybe Explorer, but who cares really) to load an empty page, or refresh the page which creates problems. In order to avoid that, remove the href attribute altogether, and instead use an inline style for the cursor for when you hover over it. Here is the code similar to what foleyatwork posted above but without the button styling <a onclick="window.history.go(-1);" style="cursor:pointer;" >GO BACK</a> Link to comment
johnhalldesign Posted December 6, 2016 Share Posted December 6, 2016 This works great, but wondering if there is an easy way to have the look of the button match the style of the standard Squarespace small button style. Link to comment
peck Posted February 22, 2017 Share Posted February 22, 2017 I am looking for that too. More specifically, a BACK (to last page in the series) and NEXT (to next page in the series) like there is in the blog. I want to make it easy for the user to just click next, next, next without returning to the 'gallery' page. ideas? Link to comment
quibble42 Posted October 27, 2017 Share Posted October 27, 2017 https://answers.squarespace.com/questions/53523/add-custom-css-to-buttons-to-make-it-go-back-to-previous-page.html This is easier and works for any button. Link to comment
quibble42 Posted October 27, 2017 Share Posted October 27, 2017 see my answer below :) Link to comment
quibble42 Posted October 27, 2017 Share Posted October 27, 2017 see my answer below :) Link to comment
Guest Posted September 27, 2019 Share Posted September 27, 2019 You can try out it easily. Yes its very easily. I have done it and you can also do. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.