• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 585
  • Last Modified:

redirect parent page from an iframe (based in DotNetNuke)

hi all,

our main site runs on DotNetNuke so the application i'm writing works within a viva.iframe within one of the pages.

I have set the timeout to 30 mins but when this expires (ie. session variables blank) i want to redirect the main page to the login page.

Is there an easy way to redirect the parent of an iframe, also has anyone had any knowledge working this with DotNetNuke as i tried a little test using a javascript function (parent.location.href='page.asp') but this didn't work.

I've managed to get it to detect when the session has timed out but my initial obvious redirect opened the entire site within the iframe (like it would).

Thank you
0
bhendrick
Asked:
bhendrick
  • 2
1 Solution
 
flipzCommented:
If you want to redirect the topmost frame then use top.location.href='page.asp'.
0
 
bhendrickAuthor Commented:
thats exactly what i was looking for, brilliant thankyou.... something so simple yet so effective
0
 
flipzCommented:
No problem - glad to be of help.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now