Scroll to widget within a dynamic panel

My dynamic panel has a lot of content, so is scrollable. I’d like to add in “back to top” links at various points.

i thought that by creating a hotspot and placing it at the top of the page, and then using the Scroll to widget action I could get the “back to top” link to scroll to the top of the page, but it isn’t working.

Any suggestions?


You can’t use the “Scroll to” action inside a dynamic panel to affect another dynamic panel or the page itself. If you put the hotspot inside the dynamic panel at the top, the “scroll to” should work.

To scroll the page, the widget that fires the “scroll to” action needs to be on the page level. For example: put a hotspot at the top of the page, and set its OnClick to “Scroll to, This Widget”. Now set a widget inside the dynamic panel to fire the on click event on hotspot. This will let you scroll the page from inside the panel.

Now, I don’t know how helpful this all actually is, because if you’re scrolling inside a panel, you’re not scrolling the page so the page hasn’t scrolled at all… :smiley:

Thanks for the reply :slight_smile: I’ll play with that.

A colleague got it working for me, I needed to set the scrolling of the dynamic panel to “never scroll” so that it is the page that’s scrolling, and now it works.

Hi, I have a scrollable dynamic panel with 2 states, and, on state change, I want to scroll to a widget in the selected panel state. From what I am reading it seems it is possible, but it doesn’t work. See example file.


scroll-to-anchor-dynamic-panel.rp (57.0 KB)

@madven, Yes this is possible, but you need to ensure your “scope” is correct, as @huban points out. In your example, the scope is the whole page. See this updated file with a solution to change the scope to the dynamic panel.

scroll-to-anchor-dynamic-panel.rp (75.0 KB)

@mbc66 Thank you for taking the time to code it, super clear and it works!