This is a migrated thread and some comments may be shown as answers.

Restrict page in RadWindow

3 Answers 48 Views
Window
This is a migrated thread and some comments may be shown as answers.
Gosha
Top achievements
Rank 1
Gosha asked on 14 Oct 2010, 08:53 PM
I use client function "radopen" to open RadWindow and show one page in it. 

Scenario: RadWindow is closed, main page is showed. After a while the session expires and, not knowing that, I open RadWindow and it show login page inside (!!!) which is completely wrong and inappropriate to me.

Can RadWindow somehow be limited to display only the page I told him, and if he can not, to close? Login page is not intended there to be loaded!

3 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Tunev
Telerik team
answered on 18 Oct 2010, 02:14 PM
Hi Sasa,

Such behavior is expected - you will get the same result if you don't use RadWindow, but a standard popup or load the content page in an IFRAME. In all cases, when you open a page while your session has been expired, you will be redirected to the login page.
To avoid the problem, I would suggest to add a "frame buster" script to the login page that will ensure that this page will always be opened in the browser window.
For example:
if (window != window.top) window.top.location.href = window.location.href; 

The logic behind it is simple - if this page is not displayed as a topmost page (e.g directly in the browser) but in some container (like IFRAME / RadWindow /etc.) - load it as topmost page. This way when your session is expired and you open a page in a RadWindow, you'll be redirected to the login page inside the RadWindow. Because of the script above, however, the login page will be loaded as topmost - directly in the browser's window.

Sincerely yours,
Georgi Tunev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Gosha
Top achievements
Rank 1
answered on 25 Oct 2010, 09:02 PM
Now what annoys me is ReturnUrl= so after logging user is redirected to page that was supposed to be inside RadWindow. How to get rid of that "ReturnUrl=" from url?
0
Georgi Tunev
Telerik team
answered on 26 Oct 2010, 01:01 PM
Hi Sasa,

The last issue is not directly related to the RadWindow control, but to the way the authentication works. I would suggest to check the Net for possible solutions - for example you could check this thread.

Kind regards,
Georgi Tunev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Window
Asked by
Gosha
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Gosha
Top achievements
Rank 1
Share this question
or