Solved

redirect parent page from an iframe (based in DotNetNuke)

Posted on 2007-04-05
3
572 Views
Last Modified: 2010-05-18
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
Comment
Question by:bhendrick
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
flipz earned 500 total points
ID: 18856776
If you want to redirect the topmost frame then use top.location.href='page.asp'.
0
 

Author Comment

by:bhendrick
ID: 18856839
thats exactly what i was looking for, brilliant thankyou.... something so simple yet so effective
0
 
LVL 11

Expert Comment

by:flipz
ID: 18857393
No problem - glad to be of help.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now