Page 1 of 1

Closing popup

Posted: Sun Apr 28, 2013 12:56 pm
by Michael Pierce

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.


Closing popup

Posted: Sun Apr 28, 2013 1:15 pm
by dale

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.


Closing popup

Posted: Sun Apr 28, 2013 1:50 pm
by Michael Pierce

I don't quite understand what you are describing.


Closing popup

Posted: Sun Apr 28, 2013 4:03 pm
by Illya Stepanov

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


Closing popup

Posted: Sun Apr 28, 2013 4:09 pm
by Illya Stepanov

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.


Closing popup

Posted: Wed Jun 05, 2013 2:55 pm
by Dan Sweeney

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.


Closing popup

Posted: Wed Jun 05, 2013 5:35 pm
by Kateryna Grynko

Hi Dan,
We can't reproduce it. Please provide us with a public link so we can take a look.