Help! Need page to remember Scroll position

Hi there, i’m prototyping a simple click through and want the page to remember the scroll position, there is this Maintain scroll position after click but i have no idea how to implement it, i’ve only been using axure for a day… Any help would be really appreciated…

1 Like

Add a Hotspot widget. Give it a name. How about “ScrollTarget”. Add a global variable. Let’s call it “ScrollPosition”.

Set value of ScrollPosition to: [[Window.scrollY]]

Move widget ScrollTarget to X:0, Y:[[ScrollPosition]]
Scroll to widget ScrollTarget

1 Like

That works great, thank you so much!

Is there any way to do the same, but inside of scrolling dynamic panel? I do not have window to scroll, but panel.

Hi Jerry000,

You can do this with the dynamic panel’s OnScroll event with [[widget.scrollY]]. So following nkrisc’s example:

  1. Add a hot spot widget inside the targeted state of your dynamic panel.
  2. Add a global variable, e.g. scrollposition.
  3. OnScroll of the dynamic panel, set value of scrollposition to [[This.scrollY]] where This is the dynamic panel.
  4. Add an additional Move To interaction to the OnScroll where you move the hot spot to (0, [[scrollposition]]).

I’ve added an example file to demonstrate this. Hope it helps!

SaveScrollinDP.rp (56.6 KB)

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.