Sidebar Radio button - every option uses a script with an input parameter for the page name

Hi everyone.

I have the following conundrum.

I have built a script which has a which takes the page name as an input ‘def app(page_name):’. this selects the information for the relevant page I want to display.

I also have an with a sidebar radio button which looks like this

if selection == “Home”:
elif selection == “Common”: = ‘Common’)
elif selection == “Data collection”: = ‘Data Collection’)

So essentially the panels on Common and Data Collection are the same, it’s just numbers that change. When you go into Common and work your way down to the page, you get to a ‘Submit’ button which writes some data back to a spreadsheet. This works fine, however, once I select ‘Data Collection’, the page loaded starts from the place where I previously stopped, i.e. not the beginning of the page. I don’t think this is related to cookies. How can I make sure the next page loaded will start from the top?