I have a page which has a Next button. When the next button is clicked it send parameters over to another page (The next button redirects to another page and sets the value of a varaible on that page). This all works well, but now before redirecting, I would like to have a confirmation pop up window show up which confirms the user really wants to leave this page.
So I created a dyanmic action which when the next button is clicked and it executes some javascript:
apex.confirm("Are you sure you want to leave?", 'NEXT');
The popup shows up, but when I click OK it just redirect me back to the same page with all fields empty now. I need to it redirect it to the 2nd page where the next button is supposed to go? How can this be accomplished?
Cheers!