Solved

redirect parent page from an iframe (based in DotNetNuke)

Posted on 2007-04-05
3
570 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
Comment Utility
If you want to redirect the topmost frame then use top.location.href='page.asp'.
0
 

Author Comment

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

Expert Comment

by:flipz
Comment Utility
No problem - glad to be of help.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
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…

763 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

9 Experts available now in Live!

Get 1:1 Help Now