I have a popup that will display with the rules of a game when a button is clicked but when the popup is closed the previous page reloads. Is there a way to prevent this reload? I basically want to just return right back to where I left off.
I have a popup that will display with the rules of a game when a button is clicked but when the popup is closed the previous page reloads. Is there a way to prevent this reload? I basically want to just return right back to where I left off.
I was having issues like this, but in the end (and for other reasons also) I opted for multi-page. Then rather than detect 'load' events on pages, I detect 'shows' to do stuff.
I don't quite understand what you are describing.
Hi Michael, if you open your popup through "Open as popup" - then at popup closing the page update doesn't happens (all selected checkboxes, entered text in Input area & taskarea - everything is kept). But an event occurs - page show.
If it is not needed, you can set a flag and then check it on the event page show.
For example, on a page show popups put code:
codelocalStorage.setItem('fromPopUp', 'true');
а на page show страницы с которой открывается попап повесить код
if (localStorage.getItem('fromPopUp') == 'true') {
localStorage.setItem('fromPopUp', 'false');
return;
} /code
And it's also very important - that this code from page show on which opens up popup should be very first in the list of events
Hi Michael, if you open your popup through "Open as popup" - then at popup closing the page update doesn't happens (all selected checkboxes, entered text in Input area & taskarea - everything is kept). But an event occurs - page show.
If it is not needed, you can set a flag and then check it on the event page show.
For example, on a page show popups put code:
codelocalStorage.setItem('fromPopUp', 'true');/code
and on a page show from which the popup opens:
codeif (localStorage.getItem('fromPopUp') == 'true') {
localStorage.setItem('fromPopUp', 'false');
return;
} /code
And it's also very important - that this code from page show on which opens up popup should be very first in the list of events.
Hi Illya
I'm encountering this same problem and have tried your suggestion but it's not quite working for me.
My page has a listitem which is populated by a rest service on page load (works fine), I then have a button which shows a popup and when I close the popup, the page is blank, as if their are no records in the listcontrol.
Hi Dan,
We can't reproduce it. Please provide us with a public link so we can take a look.