Restrict page in RadWindow

4 posts, 1 answers
  1. Gosha
    Gosha avatar
    36 posts
    Member since:
    Aug 2010

    Posted 14 Oct 2010 Link to this post

    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!
  2. Answer
    Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 18 Oct 2010 Link to this post

    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
  3. Gosha
    Gosha avatar
    36 posts
    Member since:
    Aug 2010

    Posted 25 Oct 2010 Link to this post

    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?
  4. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 26 Oct 2010 Link to this post

    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
Back to Top