This really seems too simple, and I can't get it to work. I have two pages (page1 and page2). I have the following actions:
On page 1:
(1) page1 - page show - set local variable locPage (its not bound to a component and the value is set to "page1")
(2) btnFeedback - onClick - Navigate to page - Feedback
On page 2:
(1) page2 - page show - set local variable locPage (its not bound to a component and the value is set to "page2")
(2) btnFeedback - onClick - Navigate to page - Feedback
On the Feedback page, I click a button (btnCancel) to return to either page1 or page2 depending on what the value of locPage is. I have the following action on btnCancel:
btnCancel - onClick - Run javascript (see code below)
Using the browser debug tools/console, I see that the variable changes value as it should in the console based on the page I'm on, but btnCancel always returns to page1, even if I access page Feedback from page2.