Scroll to an anchor link on a new page

Hi there,
Is it still not possible to scroll to an anchor link on a new page?


Yes, by using a global variable. You set the value of the variable on your first page and then check on the second page add OnPageLoad if variable equals whatever, scroll to widget.

Thanks James.

But this doesn’t scale, I think.
I have to do something like …

if variable value is “a” then scroll to widget a
if variable value is “b” then scroll to widget b
if variable value is “c” then scroll to widget c

Is there something like… scroll to ?

Thanks a lot.

No. That would be a very good improvement to make actually. If you could set to scroll to widget value [[Variable]]

Perhaps we can convince Rachel to build it for us? :slight_smile:
Anchor Link (with scroll to) to a new page

I also need to click on a label on page1.html and link a paragraph on page2.html. But I get tired of practicing with global variables and it does not work, nor have I found an example that works.

Please, Rachel help us…


Hi juber!

You should be able to do this using global variables - could you post your RP file here where this is not working for you? That is, you could set the variable to a value like “1” before opening page2, and OnPageLoad of page2, add conditional logic to check if this variable value equals “1”, and if so, scroll to the targeted widget in the paragraph on this page.

I’ve attached a simple example file demonstrating this. Please lmk if that’s different from what you’re seeing!

ScrolltoWidgetonNewPage.rp (57.0 KB)

1 Like