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

RadWindow and Forms Authentication

1 Answer 62 Views
Window
This is a migrated thread and some comments may be shown as answers.
Velma
Top achievements
Rank 1
Velma asked on 07 Jul 2011, 10:14 PM
I found this tip in another forum post:
----------------------
      http://www.telerik.com/community/forums/aspnet/window/forms-authentication.aspx#454784

     >If I understand you correctly you wish to redirect the parent page to your login one once the session expires. If this
      is the case, our suggestion is to add the following code to your Login page

      if (window != window.top) window.top.navigate(window.location.href); (IE only)
       OR
      if (window != window.top) window.top.location.href = window.location.href; (cross-browser)

    This code makes sure that the Login page loads in the top browser window, even if it is initially loaded in one of the
     RadWindow  objects.
----------------------

I do a reasonable amount of Javascript coding here and there, but nothing with window management. Into what event would I insert this code snip? Could you give a more complete code sample?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 08 Jul 2011, 12:48 PM
Hello Velma,

You can add this script directly in the head or in the body of the form, so that it is executed as soon as it is received. You could also attach it to the window.onload event if you like. There really is no limitation as to when this should be executed, as it relies on accessing the frame object, which is created before you have content on the page.

For your convenience I created a simple demo that you can find attached.


Regards,
Marin
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Window
Asked by
Velma
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or