Unofficial Nextion/TJC User Forum

Sending user to diffrent pages from same page

Greetings,
I have a project that contains multiple pages and within those pages there are several buttons these buttons after released sends user to another page (to same page for every button) what I would like to achieve is that after button is pressed and user is now in the page that every button leads and return the user to the page that pressed button is located
Thank you for your support

It sounds like you need to store the ID of the displayed page ‘dp’ in a global variable before changing to the next page. Use this value (variable) to return to the calling page afterwards.

3 Likes

//Global variable in each page initialization
pageNumberPad.vaPageCaller.val=dp

// Code in button on pageNumberPad
page vaPageCaller.val

1 Like

Thank you for global variable tip @elf and @Marc, issue is solved, I set a global variable in my opening page and on the pages that have buttons in it I set the value equal the pages ID then in the page that buttons lead I check the global variable’s value and return that page.

1 Like

This forum is in no way affiliated with NEXTION®, ITEAD STUDIO®, TJC®, or anyone else really. All product names, logos, and brands are property of their respective owners. All company, product, and service names used in this website are for identification purposes only. Use of these names, logos, and brands does not imply endorsement from the respective rights holder(s).