0
votes

I use a popup window for edit operations using the Kendoui framework.

When a session times out while the popup is open the login page will load inside of the popup window.

I would like to add js in the forms redirect page and check if it is being loaded inside a popup window and if so redirect and close the window.

Is there a way to determine if a page is loaded inside of a popup and if so how can I get a handle to it?

Thanks

1

1 Answers

2
votes

Usually the page is not redirected to the login page until you click button or do something. We had the same problem and we solved it using Ajax call for our popup. So we had some button on the popup and we read the response from the server. If the session is already expired you will have the wrong response code (not 200 definitely). You can read and interpret it and in your JS close popup window and do redirect to the login page like:

window.location = login_url