Solved

redirect parent page from an iframe (based in DotNetNuke)

Posted on 2007-04-05
3
574 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

776 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