Creating relative links

Is it possible to create links that are relative to the current page or location?

There are two different implementations I am seeking to do.

  1. I would like to create a link that takes the user back to whatever page they were previously on. The equivalent of the browser back button.

  2. I would like to create buttons which when using scroll locations will move the user back or forward by one location.

I haven’t found anything so far in the help files.

Any suggestions please?


Yes. From Duncan, a while ago:

It’s not built-in in Sparkle because it’s not a common pattern, but it can be done with a tiny bit of javascript. In your button “On click” action, set it to open external website, then enter this:


Should do the trick.

(2) only by linking manually to the scroll locations - as far as i know.

Mr. F.


Thanks for quick reply Mr. F.

  1. Fine. that sounds easy enough. :grinning:

  2. In other words absolute addressing. OK. I am pretty sure I have a work around that would do what I want using direct linking but it is a bit convoluted and clumsy. I was hoping there might be an easy way out.

Thanks again.

David Mac