Michael Pierce
Posts: 0
Joined: Mon Apr 22, 2013 12:36 am

Closing popup

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.

dale
Posts: 0
Joined: Fri Mar 29, 2013 5:28 pm

Closing popup

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.

Michael Pierce
Posts: 0
Joined: Mon Apr 22, 2013 12:36 am

Closing popup

I don't quite understand what you are describing.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Closing popup

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

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Closing popup

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.

Dan Sweeney
Posts: 0
Joined: Thu Feb 21, 2013 9:49 am

Closing popup

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.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Closing popup

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

Return to “Issues”